Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
Types ¶
type Cluster ¶
type Cluster struct {
Fingerprint string `json:"fingerprint"`
Canonical string `json:"canonical"`
Members []Query `json:"members"`
TotalCalls int64 `json:"total_calls"`
TotalExecTimeMs float64 `json:"total_exec_time_ms,omitempty"`
MeanExecTimeMs float64 `json:"mean_exec_time_ms,omitempty"`
Rows int64 `json:"rows,omitempty"`
Params []ParamAttribution `json:"params,omitempty"`
Owners map[string]string `json:"owners,omitempty"`
RegresqlMeta map[string]string `json:"regresql_meta,omitempty"`
DynamicTagKeys []DynamicKeyObservation `json:"dynamic_tag_keys,omitempty"`
}
func Group ¶
Group clusters queries by canonical fingerprint. Queries that fail to parse become singleton clusters with empty Fingerprint. Output is sorted by descending TotalExecTimeMs (when any timing is present), otherwise by descending TotalCalls, with Fingerprint as the tiebreaker. Each cluster's Members are sorted by QueryID, then Raw, and Canonical is the normalized form of the first member after that sort.
type DynamicKeyObservation ¶ added in v0.3.0
type ParamAttribution ¶
type Query ¶
type Query struct {
Raw string `json:"raw"`
QueryID int64 `json:"queryid,omitempty"`
Calls int64 `json:"calls,omitempty"`
TotalExecTimeMs float64 `json:"total_exec_time_ms,omitempty"`
MeanExecTimeMs float64 `json:"mean_exec_time_ms,omitempty"`
StddevExecTimeMs float64 `json:"stddev_exec_time_ms,omitempty"`
Rows int64 `json:"rows,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.