Commit 10f119c
authored
chore: add switchDictionary benchmarks (#14201)
This adds benchmarks for the `switchDictionary` method within pprofile.
None of them should emit allocs ever.
```
goos: darwin
goarch: arm64
pkg: go.opentelemetry.io/collector/pdata/pprofile
cpu: Apple M1 Max
BenchmarkFunctionSwitchDictionary-10 87434488 13.44 ns/op 0 B/op 0 allocs/op
BenchmarkKeyValueAndUnitSwitchDictionary-10 584721352 2.047 ns/op 0 B/op 0 allocs/op
BenchmarkLineSwitchDictionary-10 577840999 2.073 ns/op 0 B/op 0 allocs/op
BenchmarkLocationSwitchDictionary-10 55512399 21.56 ns/op 0 B/op 0 allocs/op
BenchmarkMappingSwitchDictionary-10 26952688 44.67 ns/op 0 B/op 0 allocs/op
BenchmarkProfileSwitchDictionary-10 24649387 48.70 ns/op 0 B/op 0 allocs/op
BenchmarkProfilesSwitchDictionary-10 58513749 20.36 ns/op 0 B/op 0 allocs/op
BenchmarkResourceProfilesSwitchDictionary-10 67610554 16.99 ns/op 0 B/op 0 allocs/op
BenchmarkSampleSwitchDictionary-10 468034540 2.573 ns/op 0 B/op 0 allocs/op
BenchmarkScopeProfilesSwitchDictionary-10 90358615 13.13 ns/op 0 B/op 0 allocs/op
BenchmarkStackSwitchDictionary-10 35702508 33.42 ns/op 0 B/op 0 allocs/op
BenchmarkValueTypeSwitchDictionary-10 91959018 12.88 ns/op 0 B/op 0 allocs/op
```1 parent 78ab16d commit 10f119c
File tree
35 files changed
+359
-0
lines changed- connector
- connectortest
- xconnector
- consumer
- consumererror
- xconsumererror
- consumertest
- xconsumer
- internal
- fanoutconsumer
- testutil
- pdata
- pprofile
- testdata
- xpdata
- processor
- processorhelper
- xprocessorhelper
- processortest
- xprocessor
- receiver
- receiverhelper
- receivertest
- xreceiver
- scraper
- scraperhelper
- xscraper
35 files changed
+359
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
252 | 254 | | |
253 | 255 | | |
254 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
255 | 279 | | |
256 | 280 | | |
257 | 281 | | |
| |||
0 commit comments