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>
(cherry picked from commit febba3971b
)
This commit is contained in:
parent
d4c334b705
commit
bd6405df01
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++ {
|
||||
|
|
|
@ -194,7 +194,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