mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
make go vet happy
Address `non-constant format string in call` check: https://github.com/golang/go/issues/60529 Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
220b1659b6
commit
febba3971b
3 changed files with 4 additions and 5 deletions
|
@ -13,7 +13,7 @@ func BenchmarkMetrics(b *testing.B) {
|
|||
|
||||
var pi promInstant
|
||||
if err := pi.Unmarshal(payload); err != nil {
|
||||
b.Fatalf(err.Error())
|
||||
b.Fatal(err.Error())
|
||||
}
|
||||
b.Run("Instant", func(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
|
|
|
@ -115,7 +115,7 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool {
|
|||
startTime := time.Now()
|
||||
defer requestDuration.UpdateDuration(startTime)
|
||||
tracerEnabled := httputils.GetBool(r, "trace")
|
||||
qt := querytracer.New(tracerEnabled, r.URL.Path)
|
||||
qt := querytracer.New(tracerEnabled, "%s", r.URL.Path)
|
||||
|
||||
// Limit the number of concurrent queries.
|
||||
select {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package querytracer
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"sync"
|
||||
"testing"
|
||||
|
@ -153,11 +152,11 @@ func TestTraceConcurrent(t *testing.T) {
|
|||
childLocal.Done()
|
||||
var wg sync.WaitGroup
|
||||
for i := 0; i < 3; i++ {
|
||||
child := qt.NewChild(fmt.Sprintf("child %d", i))
|
||||
child := qt.NewChild("child %d", i)
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
for j := 0; j < 100; j++ {
|
||||
child.Printf(fmt.Sprintf("message %d", j))
|
||||
child.Printf("message %d", j)
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
|
|
Loading…
Reference in a new issue