mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
app/vmselect/searchutils: do not print flag name responsible for query timeout if the timeout isn't reached
This should make the log message more clear
This commit is contained in:
parent
81da751e27
commit
353aad9da9
1 changed files with 1 additions and 1 deletions
|
@ -229,7 +229,7 @@ func (d *Deadline) String() string {
|
|||
startTime := time.Unix(int64(d.deadline), 0).Add(-d.timeout)
|
||||
elapsed := time.Since(startTime)
|
||||
msg := fmt.Sprintf("%.3f seconds (elapsed %.3f seconds)", d.timeout.Seconds(), elapsed.Seconds())
|
||||
if d.flagHint != "" {
|
||||
if float64(elapsed)/float64(d.timeout) > 0.9 && d.flagHint != "" {
|
||||
msg += fmt.Sprintf("; the timeout can be adjusted with `%s` command-line flag", d.flagHint)
|
||||
}
|
||||
return msg
|
||||
|
|
Loading…
Reference in a new issue