File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ variables:
9
9
INDEX_FILE : index.txt
10
10
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE : dd-trace-go
11
11
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY : " true"
12
- BENCHMARK_TARGETS : " BenchmarkStartRequestSpan|BenchmarkHttpServeTrace|BenchmarkTracerAddSpans|BenchmarkStartSpan|BenchmarkSingleSpanRetention|BenchmarkOTelApiWithCustomTags|BenchmarkInjectW3C|BenchmarkExtractW3C|BenchmarkPartialFlushing|BenchmarkGraphQL|BenchmarkSampleWAFContext|BenchmarkCaptureStackTrace|BenchmarkSetTagString|BenchmarkSetTagStringPtr|BenchmarkSetTagMetric|BenchmarkSetTagStringer"
12
+ BENCHMARK_TARGETS : " BenchmarkStartRequestSpan|BenchmarkHttpServeTrace|BenchmarkTracerAddSpans|BenchmarkStartSpan|BenchmarkSingleSpanRetention|BenchmarkOTelApiWithCustomTags|BenchmarkInjectW3C|BenchmarkExtractW3C|BenchmarkPartialFlushing|BenchmarkGraphQL|BenchmarkSampleWAFContext|BenchmarkCaptureStackTrace|BenchmarkSetTagString|BenchmarkSetTagStringPtr|BenchmarkSetTagMetric|BenchmarkSetTagStringer|BenchmarkSerializeSpanLinksInMeta "
13
13
14
14
include :
15
15
- " .gitlab/benchmarks.yml"
Original file line number Diff line number Diff line change @@ -1053,6 +1053,27 @@ func BenchmarkSetTagField(b *testing.B) {
1053
1053
}
1054
1054
}
1055
1055
1056
+ func BenchmarkSerializeSpanLinksInMeta (b * testing.B ) {
1057
+ span := newBasicSpan ("bench.span" )
1058
+
1059
+ span .AddSpanLink (ddtrace.SpanLink {SpanID : 123 , TraceID : 456 })
1060
+ span .AddSpanLink (ddtrace.SpanLink {SpanID : 789 , TraceID : 101 })
1061
+
1062
+ // Sample span pointer
1063
+ attributes := map [string ]string {
1064
+ "link.kind" : "span-pointer" ,
1065
+ "ptr.dir" : "d" ,
1066
+ "ptr.hash" : "eb29cb7d923f904f02bd8b3d85e228ed" ,
1067
+ "ptr.kind" : "aws.s3.object" ,
1068
+ }
1069
+ span .AddSpanLink (ddtrace.SpanLink {TraceID : 0 , SpanID : 0 , Attributes : attributes })
1070
+
1071
+ b .ResetTimer ()
1072
+ for i := 0 ; i < b .N ; i ++ {
1073
+ span .serializeSpanLinksInMeta ()
1074
+ }
1075
+ }
1076
+
1056
1077
type boomError struct {}
1057
1078
1058
1079
func (e * boomError ) Error () string { return "boom" }
You can’t perform that action at this time.
0 commit comments