Documentation
¶
Overview ¶
Package perftrace records timings for scripts/perfbench, only when its environment variables ask for it; unset (always, outside a benchmark) every call returns after reading a package variable.
GODWIT_STARTUP_TRACE names a file that gets "<step> <unix ns>" per Mark: when each step of a backend's start ended.
GODWIT_SQL_TRACE names a file that gets one tab-separated line per database call: start and end (unix ns), kind (q, x, t), the Local API call it serves ("" for background work) and the statement's start. Every call waits for the one SQLite connection, so a reader recovers each call's wait from the order of the ends.
Index ¶
Constants ¶
const ( StartupEnv = "GODWIT_STARTUP_TRACE" SQLEnv = "GODWIT_SQL_TRACE" )
The variables that turn the traces on.
Variables ¶
This section is empty.
Functions ¶
func SQL ¶
SQL records a database call that began at start and has just ended. A cancelled call is left out: it may never have held the connection, and its end would cut into the holder's run in perfbench's wait split.
func WithClient ¶
WithClient tags a connection's ctx with the client name its hello gave. ctx itself when the SQL trace is off.
Types ¶
This section is empty.