View Source Guesswork.Telemetry.QueryRun (Guesswork v0.4.4)
Represents a single 'run', or resolution, of a query.
Summary
Functions
Returns a key used for storage in ets.
Takes a query run and the duration
of the run then completes the record by
calculating and inserting the end_time
and duration
.
duration
is assumed to be :native
unix times.
Takes a query run the duration
and the error that failed the query, and then
completes the record by calculating and inserting the end_time
and duration
.
duration
is assumed to be :native
unix times.
Attempts to build a new query run entry using the needed ids and the start time
provided by telemetry (assumes a :native
unix time).
Types
@type t() :: %Guesswork.Telemetry.QueryRun{ duration_ms: integer() | nil, end_time: DateTime.t() | nil, error: nil | term(), query_id: String.t(), run_id: String.t(), start_time: DateTime.t() }
Functions
Returns a key used for storage in ets.
Takes a query run and the duration
of the run then completes the record by
calculating and inserting the end_time
and duration
.
duration
is assumed to be :native
unix times.
Takes a query run the duration
and the error that failed the query, and then
completes the record by calculating and inserting the end_time
and duration
.
duration
is assumed to be :native
unix times.
Attempts to build a new query run entry using the needed ids and the start time
provided by telemetry (assumes a :native
unix time).