File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ // Unless explicitly stated otherwise all files in this repository are licensed
2+ // under the Apache License Version 2.0.
3+ // This product includes software developed at Datadog (https://www.datadoghq.com/).
4+ // Copyright 2016 Datadog, Inc.
5+
6+ package stacktrace
7+
8+ import "testing"
9+
10+ func BenchmarkParseSymbol (b * testing.B ) {
11+ testCases := []string {
12+ "github.com/DataDog/dd-trace-go/v2/internal/stacktrace.TestFunc" ,
13+ "github.com/DataDog/dd-trace-go/v2/internal/stacktrace.(*Event).NewException" ,
14+ "github.com/DataDog/dd-trace-go/v2/internal/stacktrace.TestFunc.func1" ,
15+ "os/exec.(*Cmd).Run.func1" ,
16+ "test.(*Test).Method" ,
17+ "test.main" ,
18+ }
19+
20+ b .ResetTimer ()
21+ for i := 0 ; i < b .N ; i ++ {
22+ for _ , tc := range testCases {
23+ _ = parseSymbol (tc )
24+ }
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments