Skip to content

Commit

Permalink
fix resource
Browse files Browse the repository at this point in the history
  • Loading branch information
knusbaum committed Nov 18, 2020
1 parent 6838df9 commit ba057e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/trace/sampler/scoresampler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package sampler

import (
"fmt"
"math"
"math/rand"
"testing"
Expand Down Expand Up @@ -134,7 +135,7 @@ func BenchmarkSampler(b *testing.B) {

for i := 0; i < b.N; i++ {
trace := pb.Trace{
&pb.Span{TraceID: 1, SpanID: 1, ParentID: 0, Start: 42, Duration: 1000000000, Service: "mcnulty", Type: "web", Resource: string(rand.Intn(signatureCount))},
&pb.Span{TraceID: 1, SpanID: 1, ParentID: 0, Start: 42, Duration: 1000000000, Service: "mcnulty", Type: "web", Resource: fmt.Sprint(rand.Intn(signatureCount))},
&pb.Span{TraceID: 1, SpanID: 2, ParentID: 1, Start: 100, Duration: 200000000, Service: "mcnulty", Type: "sql"},
&pb.Span{TraceID: 1, SpanID: 3, ParentID: 2, Start: 150, Duration: 199999000, Service: "master-db", Type: "sql"},
&pb.Span{TraceID: 1, SpanID: 4, ParentID: 1, Start: 500000000, Duration: 500000, Service: "redis", Type: "redis"},
Expand Down

0 comments on commit ba057e5

Please sign in to comment.