Chore: Fix the command in comments (#73872)

Fix the command in comments
This commit is contained in:
ismail simsek 2023-08-28 18:47:54 +03:00 committed by GitHub
parent 4e2710670e
commit cfe3d6346f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ import (
) )
// when memory-profiling this benchmark, these commands are recommended: // 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 // - go tool pprof -http=localhost:6061 memprofile.out
func BenchmarkExemplarJson(b *testing.B) { func BenchmarkExemplarJson(b *testing.B) {
queryFileName := filepath.Join("../testdata", "exemplar.query.json") queryFileName := filepath.Join("../testdata", "exemplar.query.json")
@ -58,8 +58,9 @@ func BenchmarkExemplarJson(b *testing.B) {
var resp *backend.QueryDataResponse var resp *backend.QueryDataResponse
// when memory-profiling this benchmark, these commands are recommended: // 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 // - go tool pprof -http=localhost:6061 memprofile.out
// - benchstat old.txt new.txt
func BenchmarkRangeJson(b *testing.B) { func BenchmarkRangeJson(b *testing.B) {
var ( var (
r *backend.QueryDataResponse r *backend.QueryDataResponse