Skip to content

Commit

Permalink
report allocs internally
Browse files Browse the repository at this point in the history
  • Loading branch information
tomershafir committed Jan 14, 2024
1 parent 3a09fa8 commit 06a4e31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion receiver/pyroscopereceiver/pyroscope_pipeline_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type request struct {

// Benchmarks a running otelcol pyroscope write pipeline (collector and Clickhouse).
// Adjust collectorAddr to bench a your target if needed.
// Example: go test -benchmem -bench ^BenchmarkPyroscopePipeline$ github.com/metrico/otel-collector/receiver/pyroscopereceiver -benchtime 10s -count 6 -cpu 1 | tee bench.txt
// Example: go test -bench ^BenchmarkPyroscopePipeline$ github.com/metrico/otel-collector/receiver/pyroscopereceiver -benchtime 10s -count 6 -cpu 1 | tee bench.txt
func BenchmarkPyroscopePipeline(b *testing.B) {
dist := []request{
{
Expand All @@ -38,6 +38,7 @@ func BenchmarkPyroscopePipeline(b *testing.B) {
}
collectorAddr := fmt.Sprintf("http://%s%s", defaultHttpAddr, ingestPath)

b.ReportAllocs()
b.ResetTimer()
b.RunParallel(func(pb *testing.PB) {
j := 0
Expand Down

0 comments on commit 06a4e31

Please sign in to comment.