Skip to content

Commit

Permalink
fix(otelbench): note that query is failed due to timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Dec 8, 2024
1 parent f93e8f8 commit d7ea501
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/otelbench/logql_analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ func (a LogQLAnalyze) renderPretty(report logqlbench.LogQLReport, w io.Writer) e
d := time.Duration(nanos) * time.Nanosecond
return d.Round(time.Millisecond / 20).String()
}
fmt.Fprintln(&buf, " duration:", formatNanos(q.DurationNanos))
fmt.Fprint(&buf, " duration:", formatNanos(q.DurationNanos))
if q.Timeout {
fmt.Fprint(&buf, " (timeout)")
}
fmt.Fprintln(&buf)

if len(q.Queries) > 0 {
fmt.Fprintln(&buf, " sql queries:", len(q.Queries))
Expand All @@ -81,6 +85,10 @@ func (a LogQLAnalyze) renderPretty(report logqlbench.LogQLReport, w io.Writer) e
func (a LogQLAnalyze) renderBenchstat(report logqlbench.LogQLReport, w io.Writer) error {
var recs []benchfmt.Result
for _, q := range report.Queries {
if q.ReportError != "" {
continue
}

name := normalizeBenchName(q.Title)
if len(name) == 0 {
name = fmt.Appendf(name, "Query%d", q.ID)
Expand Down

0 comments on commit d7ea501

Please sign in to comment.