Commit eb9acab
authored
Fix Asm benchmark and stop-reinitializing tracer (#7750)
## Summary of changes
- Fix ASM benchmarks by not returning `null` from
`EmptyDatadogTracer.PerTraceSettings`
- Stop re-initializing `TracerSettings` for every execution of the ASM
benchmark
## Reason for change
The ASM benchmarks have been broken since
#7543 (I think). This is
because the `EmptyDatadogTracer` stub used in the benchmark returns
`null` from `PerTraceSettings` (which can't happen in practice).
Additionally, noticed that the benchmark is repeatedly creating a new
`TracerSettings` object with every execution, which will add noise and
be much more expensive than real life.
## Implementation details
- Ensure `EmptyDatadogTracer.PerTraceSettings` returns a "real" value
- Stop rebuilding `TracerSettings` with every execution
## Test coverage
This is the test1 parent 19fbd2b commit eb9acab
File tree
2 files changed
+16
-4
lines changed- tracer/test/benchmarks/Benchmarks.Trace/Asm
2 files changed
+16
-4
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
20 | 32 | | |
21 | 33 | | |
22 | | - | |
| 34 | + | |
23 | 35 | | |
24 | | - | |
| 36 | + | |
25 | 37 | | |
26 | | - | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
| |||
0 commit comments