From cfe3d6346f332ab0e7212ba7c85d457bfd1b1226 Mon Sep 17 00:00:00 2001 From: ismail simsek Date: Mon, 28 Aug 2023 18:47:54 +0300 Subject: [PATCH] Chore: Fix the command in comments (#73872) Fix the command in comments --- pkg/tsdb/prometheus/querydata/framing_bench_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/tsdb/prometheus/querydata/framing_bench_test.go b/pkg/tsdb/prometheus/querydata/framing_bench_test.go index ab131f2743a..295810ed9f6 100644 --- a/pkg/tsdb/prometheus/querydata/framing_bench_test.go +++ b/pkg/tsdb/prometheus/querydata/framing_bench_test.go @@ -24,7 +24,7 @@ import ( ) // when memory-profiling this benchmark, these commands are recommended: -// - go test -benchmem -run=^$ -benchtime 1x -memprofile memprofile.out -memprofilerate 1 -bench ^BenchmarkExemplarJson$ github.com/grafana/grafana/pkg/tsdb/prometheus/buffered +// - go test -benchmem -run=^$ -bench ^BenchmarkExemplarJson$ github.com/grafana/grafana/pkg/tsdb/prometheus/querydata -memprofile memprofile.out -count 6 | tee old.txt // - go tool pprof -http=localhost:6061 memprofile.out func BenchmarkExemplarJson(b *testing.B) { queryFileName := filepath.Join("../testdata", "exemplar.query.json") @@ -58,8 +58,9 @@ func BenchmarkExemplarJson(b *testing.B) { var resp *backend.QueryDataResponse // when memory-profiling this benchmark, these commands are recommended: -// - go test -benchmem -run=^$ -benchtime 1x -memprofile memprofile.out -memprofilerate 1 -bench ^BenchmarkJson$ github.com/grafana/grafana/pkg/tsdb/prometheus +// - go test -benchmem -run=^$ -bench ^BenchmarkRangeJson$ github.com/grafana/grafana/pkg/tsdb/prometheus/querydata -memprofile memprofile.out -count 6 | tee old.txt // - go tool pprof -http=localhost:6061 memprofile.out +// - benchstat old.txt new.txt func BenchmarkRangeJson(b *testing.B) { var ( r *backend.QueryDataResponse