Skip to content

Commit

Permalink
[batchprocessor] Skip long running split benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Traian Schiau committed Oct 26, 2021
1 parent b728969 commit 1a2f1a0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions processor/batchprocessor/splitlogs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ func BenchmarkSplitLogs(b *testing.B) {
}
}

if b.N > 100000 {
b.Skipf("SKIP: b.N too high, set -benchtine=<n>x with n < 100000")
}

clones := make([]pdata.Logs, b.N)
for n := 0; n < b.N; n++ {
clones[n] = md.Clone()
Expand Down
4 changes: 4 additions & 0 deletions processor/batchprocessor/splitmetrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ func BenchmarkSplitMetrics(b *testing.B) {
}
}

if b.N > 100000 {
b.Skipf("SKIP: b.N too high, set -benchtine=<n>x with n < 100000")
}

dataPointCount := metricDataPointCount(md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0).Metrics().At(0))
clones := make([]pdata.Metrics, b.N)
for n := 0; n < b.N; n++ {
Expand Down
4 changes: 4 additions & 0 deletions processor/batchprocessor/splittraces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ func BenchmarkSplitTraces(b *testing.B) {
}
}

if b.N > 100000 {
b.Skipf("SKIP: b.N too high, set -benchtine=<n>x with n < 100000")
}

clones := make([]pdata.Traces, b.N)
for n := 0; n < b.N; n++ {
clones[n] = td.Clone()
Expand Down

0 comments on commit 1a2f1a0

Please sign in to comment.