Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zippy1981/Added a ToString() so I can see these easier in the debugger #3302

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andrewlock
Copy link
Member

Summary of changes

Added a ToString to ImmutableInstrumentationSettings

Reason for change

So I can see them all as a list in the visual studio debugger.

Implementation details

Just Tostring()

Test coverage

Added coverage to exiting tests

Other details

Copy of #2934

@andrewlock andrewlock added the area:tests unit tests, integration tests label Oct 4, 2022
@andrewlock andrewlock requested review from a team as code owners October 4, 2022 13:16
@andrewlock
Copy link
Member Author

Benchmarks Report 🐌

Benchmarks for #3302 compared to master:

  • All benchmarks have the same speed
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net472 714μs 520ns 2.01μs 0.355 0 0 3.18 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 469μs 456ns 1.77μs 0 0 0 2.59 KB
#3302 WriteAndFlushEnrichedTraces net472 712μs 468ns 1.81μs 0.359 0 0 3.18 KB
#3302 WriteAndFlushEnrichedTraces netcoreapp3.1 461μs 228ns 881ns 0 0 0 2.58 KB
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net472 204ns 0.125ns 0.467ns 0.0727 0 0 457 B
master AllCycleSimpleBody netcoreapp3.1 252ns 0.162ns 0.605ns 0.00636 0 0 456 B
master AllCycleMoreComplexBody net472 204ns 0.156ns 0.582ns 0.0688 0 0 433 B
master AllCycleMoreComplexBody netcoreapp3.1 249ns 0.141ns 0.544ns 0.00581 0 0 432 B
master BodyExtractorSimpleBody net472 274ns 0.133ns 0.515ns 0.0573 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 238ns 0.106ns 0.411ns 0.00372 0 0 272 B
master BodyExtractorMoreComplexBody net472 15.7μs 5.53ns 19.2ns 1.21 0.0157 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 13μs 4.86ns 18.2ns 0.0911 0 0 6.75 KB
#3302 AllCycleSimpleBody net472 196ns 0.0493ns 0.184ns 0.0727 0 0 457 B
#3302 AllCycleSimpleBody netcoreapp3.1 257ns 0.199ns 0.769ns 0.0063 0 0 456 B
#3302 AllCycleMoreComplexBody net472 204ns 0.535ns 2.07ns 0.0688 0 0 433 B
#3302 AllCycleMoreComplexBody netcoreapp3.1 253ns 0.236ns 0.913ns 0.00583 0 0 432 B
#3302 BodyExtractorSimpleBody net472 275ns 0.16ns 0.598ns 0.0573 0 0 361 B
#3302 BodyExtractorSimpleBody netcoreapp3.1 239ns 0.242ns 0.904ns 0.00372 0 0 272 B
#3302 BodyExtractorMoreComplexBody net472 15.7μs 14ns 52.5ns 1.21 0.0157 0 7.62 KB
#3302 BodyExtractorMoreComplexBody netcoreapp3.1 13μs 9.19ns 35.6ns 0.0907 0 0 6.75 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
master SendRequest netcoreapp3.1 179μs 117ns 438ns 0.271 0 0 20.68 KB
#3302 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#3302 SendRequest netcoreapp3.1 179μs 146ns 564ns 0.267 0 0 20.67 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net472 1.86μs 0.531ns 1.92ns 0.156 0.000894 0 979 B
master ExecuteNonQuery netcoreapp3.1 1.48μs 0.65ns 2.52ns 0.0125 0 0 968 B
#3302 ExecuteNonQuery net472 1.9μs 1.28ns 4.78ns 0.155 0.000948 0 979 B
#3302 ExecuteNonQuery netcoreapp3.1 1.44μs 0.762ns 2.75ns 0.013 0 0 968 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net472 2.52μs 1.11ns 4.16ns 0.188 0 0 1.19 KB
master CallElasticsearch netcoreapp3.1 1.54μs 1.15ns 4.44ns 0.0154 0 0 1.13 KB
master CallElasticsearchAsync net472 2.57μs 0.853ns 3.3ns 0.21 0 0 1.32 KB
master CallElasticsearchAsync netcoreapp3.1 1.6μs 0.358ns 1.34ns 0.0169 0 0 1.25 KB
#3302 CallElasticsearch net472 2.56μs 0.543ns 1.88ns 0.188 0 0 1.19 KB
#3302 CallElasticsearch netcoreapp3.1 1.58μs 0.796ns 2.98ns 0.0151 0 0 1.13 KB
#3302 CallElasticsearchAsync net472 2.59μs 1.35ns 5.23ns 0.21 0 0 1.32 KB
#3302 CallElasticsearchAsync netcoreapp3.1 1.62μs 1.12ns 4.35ns 0.017 0 0 1.25 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net472 2.72μs 0.429ns 1.48ns 0.231 0 0 1.45 KB
master ExecuteAsync netcoreapp3.1 1.74μs 0.68ns 2.63ns 0.0185 0 0 1.38 KB
#3302 ExecuteAsync net472 2.72μs 0.528ns 1.98ns 0.23 0 0 1.45 KB
#3302 ExecuteAsync netcoreapp3.1 1.79μs 0.787ns 2.94ns 0.0183 0 0 1.38 KB
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net472 5.87μs 1.79ns 6.94ns 0.444 0 0 2.8 KB
master SendAsync netcoreapp3.1 3.69μs 1.32ns 5.1ns 0.0351 0 0 2.63 KB
#3302 SendAsync net472 5.94μs 1.48ns 5.75ns 0.444 0 0 2.8 KB
#3302 SendAsync netcoreapp3.1 3.77μs 1.34ns 5.2ns 0.036 0 0 2.63 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 3.25μs 2.44ns 9.43ns 0.298 0 0 1.88 KB
master EnrichedLog netcoreapp3.1 2.47μs 1.88ns 6.5ns 0.0259 0 0 1.91 KB
#3302 EnrichedLog net472 3.33μs 3.14ns 12.2ns 0.297 0 0 1.88 KB
#3302 EnrichedLog netcoreapp3.1 2.53μs 1.03ns 3.72ns 0.0265 0 0 1.91 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 150μs 159ns 615ns 0.748 0.224 0 4.72 KB
master EnrichedLog netcoreapp3.1 117μs 151ns 564ns 0.058 0 0 4.55 KB
#3302 EnrichedLog net472 152μs 175ns 676ns 0.683 0.228 0 4.72 KB
#3302 EnrichedLog netcoreapp3.1 118μs 204ns 763ns 0.0585 0 0 4.55 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 5.83μs 2.26ns 8.45ns 0.579 0.00291 0 3.65 KB
master EnrichedLog netcoreapp3.1 4.59μs 1.72ns 6.66ns 0.0539 0 0 3.98 KB
#3302 EnrichedLog net472 5.77μs 2.39ns 9.25ns 0.577 0.00289 0 3.65 KB
#3302 EnrichedLog netcoreapp3.1 4.43μs 2.49ns 9.62ns 0.0533 0 0 3.98 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net472 2.32μs 3.58ns 13.4ns 0.222 0 0 1.4 KB
master SendReceive netcoreapp3.1 1.76μs 1.19ns 4.47ns 0.0185 0 0 1.35 KB
#3302 SendReceive net472 2.25μs 2ns 7.75ns 0.223 0 0 1.4 KB
#3302 SendReceive netcoreapp3.1 1.78μs 0.602ns 2.33ns 0.0186 0 0 1.35 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 5.11μs 1.96ns 7.61ns 0.363 0 0 2.3 KB
master EnrichedLog netcoreapp3.1 4.26μs 2.48ns 9.59ns 0.0257 0 0 1.86 KB
#3302 EnrichedLog net472 4.96μs 1.48ns 5.35ns 0.363 0 0 2.3 KB
#3302 EnrichedLog netcoreapp3.1 4.33μs 1.43ns 5.34ns 0.0237 0 0 1.86 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net472 1.1μs 0.42ns 1.57ns 0.133 0 0 842 B
master StartFinishSpan netcoreapp3.1 944ns 0.351ns 1.31ns 0.0107 0 0 792 B
master StartFinishScope net472 1.41μs 0.916ns 3.55ns 0.146 0 0 923 B
master StartFinishScope netcoreapp3.1 1.05μs 0.347ns 1.25ns 0.0121 0 0 912 B
#3302 StartFinishSpan net472 1.15μs 0.376ns 1.46ns 0.134 0 0 842 B
#3302 StartFinishSpan netcoreapp3.1 905ns 0.327ns 1.18ns 0.0109 0 0 792 B
#3302 StartFinishScope net472 1.4μs 0.973ns 3.77ns 0.146 0 0 923 B
#3302 StartFinishScope netcoreapp3.1 1.09μs 0.524ns 1.96ns 0.0126 0 0 912 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net472 1.53μs 0.38ns 1.42ns 0.146 0 0 923 B
master RunOnMethodBegin netcoreapp3.1 1.2μs 0.311ns 1.2ns 0.0126 0 0 912 B
#3302 RunOnMethodBegin net472 1.54μs 0.619ns 2.4ns 0.146 0 0 923 B
#3302 RunOnMethodBegin netcoreapp3.1 1.21μs 0.457ns 1.71ns 0.0127 0 0 912 B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tests unit tests, integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants