Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Problem ¶
type Problem struct {
Kind ProblemKind
Query string
Count int
// AvgDuration is set only for ProblemSlowQuery.
AvgDuration time.Duration
}
Problem describes a single detected issue.
type ProblemKind ¶
type ProblemKind string
ProblemKind categorizes a detected issue.
const ( ProblemNPlus1 ProblemKind = "N+1" ProblemSlowQuery ProblemKind = "SLOW" )
type Result ¶
Result holds the CI run outcome.
func Aggregate ¶
func Aggregate(events []*tapv1.QueryEvent) Result
Aggregate computes the CI result from the given events. Intended for testing; the streaming path uses aggregator directly.
func Run ¶
Run connects to the gRPC server at addr, collects query events until ctx is cancelled or the server closes the stream, and returns the aggregated result.
func (Result) HasProblems ¶
HasProblems reports whether any issues were detected.
Click to show internal directories.
Click to hide internal directories.