Skip to content

Commit

Permalink
Merge pull request #47 from tomershafir/fix/bench-testdata
Browse files Browse the repository at this point in the history
fix testdata path in /bench
  • Loading branch information
akvlad authored Jan 15, 2024
2 parents 73bf9d5 + 3d81ccf commit d883335
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bench/pyroscope_pipeline_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/metrico/otel-collector/receiver/pyroscopereceiver/testclient"
"github.com/stretchr/testify/assert"
)

type request struct {
Expand All @@ -25,7 +26,7 @@ func BenchmarkPyroscopePipeline(b *testing.B) {
"format": "jfr",
"sampleRate": "100",
},
jfr: filepath.Join("testdata", "cortex-dev-01__kafka-0__cpu__0.jfr"),
jfr: filepath.Join("..", "receiver", "pyroscopereceiver", "testdata", "cortex-dev-01__kafka-0__cpu__0.jfr"),
},
{
urlParams: map[string]string{
Expand All @@ -34,7 +35,7 @@ func BenchmarkPyroscopePipeline(b *testing.B) {
"until": "1700332329",
"format": "jfr",
},
jfr: filepath.Join("testdata", "memory_alloc_live_example.jfr"),
jfr: filepath.Join("..", "receiver", "pyroscopereceiver", "testdata", "memory_alloc_live_example.jfr"),
},
}
collectorAddr := "http://0.0.0.0:8062"
Expand All @@ -44,7 +45,8 @@ func BenchmarkPyroscopePipeline(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
j := 0
for pb.Next() {
testclient.Ingest(collectorAddr, dist[j].urlParams, dist[j].jfr)
err := testclient.Ingest(collectorAddr, dist[j].urlParams, dist[j].jfr)
assert.NoError(b, err, "failed to ingest")
j = (j + 1) % len(dist)
}
})
Expand Down

0 comments on commit d883335

Please sign in to comment.