dd-trace-dotnet icon indicating copy to clipboard operation
dd-trace-dotnet copied to clipboard

HotChocolate GraphQL integration

Open daniel-romano-DD opened this issue 3 years ago • 6 comments

Summary of changes

HotChocolate v11-v12 Tracer integration and sample application (chose the most popular latest versions)

Reason for change

Implement integration with Hotchocolate GraphQL .net library

Implementation details

Instrumented HotChocolate.Execution.RequestExecutor.ExecuteAsync This captures the main boundary of the operation and all semantic errors. Instrumented HotChocolate.Execution.Processing.QueryExecutor from This captures the operation type if it is well formed. For V11 it only captures Query types. Instrumented HotChocolate.Execution.Processing.MutationExecutorfrom for V11 This captures the Mutation operation type if it is well formed.

Moved .Net GraphQL specific implementatiosn to Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.Net namespace HotChocolate specific implementation set on namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate Common code left on Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL

Test coverage

image image

Other details

daniel-romano-DD avatar Jul 22 '22 10:07 daniel-romano-DD

Code Coverage Report :bar_chart:

:heavy_check_mark: Merging #3004 into master will not change line coverage :heavy_check_mark: Merging #3004 into master will not change branch coverage :no_entry: Merging #3004 into master will will increase complexity by 113

master #3004 Change
Lines 16598 / 22658 16765 / 22820
Lines % 73% 73% 0% :heavy_check_mark:
Branches 9818 / 13976 9924 / 14084
Branches % 70% 70% 0% :heavy_check_mark:
Complexity 15031 15144 113 :no_entry:

View the full report for further details:

Datadog.Trace Breakdown :heavy_check_mark:

master #3004 Change
Lines % 73% 73% 0% :heavy_check_mark:
Branches % 70% 70% 0% :heavy_check_mark:
Complexity 15031 15144 113 :no_entry:

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.DuckTyping.DuckTypePropertyOrFieldNotFoundException 0% :heavy_check_mark: -62% :no_entry: 7 :no_entry:
Datadog.Trace.Ci.CIVisibility 7% :heavy_check_mark: 7% :heavy_check_mark: 0 :heavy_check_mark:

The following classes were added in #3004:

File Line coverage Branch coverage Complexity
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegration 83% 60% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegrationExtra 100% 100% 1
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateCommon 82% 76% 39
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateTags 100% 100% 2
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateTags 100% 100% 37
...And 9 more

9 classes were removed from Datadog.Trace in #3004

View the full reports for further details:

andrewlock avatar Jul 22 '22 11:07 andrewlock

Code Coverage Report :bar_chart:

:heavy_check_mark: Merging #3004 into master will not change line coverage :heavy_check_mark: Merging #3004 into master will not change branch coverage :no_entry: Merging #3004 into master will will increase complexity by 113

master #3004 Change
Lines 16600 / 22658 16693 / 22820
Lines % 73% 73% 0% :heavy_check_mark:
Branches 9825 / 13976 9897 / 14084
Branches % 70% 70% 0% :heavy_check_mark:
Complexity 15031 15144 113 :no_entry:

View the full report for further details:

Datadog.Trace Breakdown :heavy_check_mark:

master #3004 Change
Lines % 73% 73% 0% :heavy_check_mark:
Branches % 70% 70% 0% :heavy_check_mark:
Complexity 15031 15144 113 :no_entry:

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.Ci.GitInfo -17% :no_entry: -11% :no_entry: 0 :heavy_check_mark:
Datadog.Trace.DuckTyping.DuckTypePropertyOrFieldNotFoundException 0% :heavy_check_mark: -62% :no_entry: 7 :no_entry:
Datadog.Trace.Ci.CIVisibility 7% :heavy_check_mark: 7% :heavy_check_mark: 0 :heavy_check_mark:

The following classes were added in #3004:

File Line coverage Branch coverage Complexity
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegration 83% 60% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegrationExtra 100% 100% 1
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateCommon 82% 76% 39
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateTags 100% 100% 2
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateTags 100% 100% 37
...And 9 more

9 classes were removed from Datadog.Trace in #3004

View the full reports for further details:

andrewlock avatar Jul 22 '22 16:07 andrewlock

Code Coverage Report :bar_chart:

:heavy_check_mark: Merging #3004 into master will not change line coverage :heavy_check_mark: Merging #3004 into master will not change branch coverage :no_entry: Merging #3004 into master will will increase complexity by 76

master #3004 Change
Lines 16597 / 22658 16740 / 22750
Lines % 73% 74% 0% :heavy_check_mark:
Branches 9822 / 13976 9916 / 14048
Branches % 70% 71% 0% :heavy_check_mark:
Complexity 15031 15107 76 :no_entry:

View the full report for further details:

Datadog.Trace Breakdown :heavy_check_mark:

master #3004 Change
Lines % 73% 74% 0% :heavy_check_mark:
Branches % 70% 71% 0% :heavy_check_mark:
Complexity 15031 15107 76 :no_entry:

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.DuckTyping.DuckTypePropertyOrFieldNotFoundException 0% :heavy_check_mark: -62% :no_entry: 7 :no_entry:
Datadog.Trace.Ci.CIVisibility 7% :heavy_check_mark: 7% :heavy_check_mark: 0 :heavy_check_mark:

The following classes were added in #3004:

File Line coverage Branch coverage Complexity
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLCommonBase 94% 100% 5
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLTagsBase 100% 100% 1
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLTagsBase 100% 100% 37
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncV12Integration 83% 60% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncV12IntegrationExtra 100% 100% 1
...And 10 more

9 classes were removed from Datadog.Trace in #3004

View the full reports for further details:

andrewlock avatar Jul 24 '22 12:07 andrewlock

Code Coverage Report :bar_chart:

:heavy_check_mark: Merging #3004 into master will not change line coverage :heavy_check_mark: Merging #3004 into master will not change branch coverage :no_entry: Merging #3004 into master will will increase complexity by 76

master #3004 Change
Lines 16597 / 22658 16694 / 22752
Lines % 73% 73% 0% :heavy_check_mark:
Branches 9822 / 13976 9882 / 14048
Branches % 70% 70% 0% :heavy_check_mark:
Complexity 15031 15107 76 :no_entry:

View the full report for further details:

Datadog.Trace Breakdown :heavy_check_mark:

master #3004 Change
Lines % 73% 73% 0% :heavy_check_mark:
Branches % 70% 70% 0% :heavy_check_mark:
Complexity 15031 15107 76 :no_entry:

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.Ci.Processors.OriginTagTraceProcessor -9% :no_entry: -17% :no_entry: 0 :heavy_check_mark:
Datadog.Trace.DuckTyping.DuckTypePropertyOrFieldNotFoundException 0% :heavy_check_mark: -62% :no_entry: 7 :no_entry:
Datadog.Trace.Ci.CIVisibility 7% :heavy_check_mark: 7% :heavy_check_mark: 0 :heavy_check_mark:

The following classes were added in #3004:

File Line coverage Branch coverage Complexity
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLCommonBase 94% 100% 5
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLTagsBase 100% 100% 1
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLTagsBase 100% 100% 37
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegration 83% 60% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegrationExtra 100% 100% 1
...And 10 more

9 classes were removed from Datadog.Trace in #3004

View the full reports for further details:

andrewlock avatar Jul 25 '22 09:07 andrewlock

Code Coverage Report :bar_chart:

:heavy_check_mark: Merging #3004 into master will not change line coverage :heavy_check_mark: Merging #3004 into master will not change branch coverage :no_entry: Merging #3004 into master will will increase complexity by 80

master #3004 Change
Lines 16792 / 22859 16906 / 22958
Lines % 73% 74% 0% :heavy_check_mark:
Branches 10000 / 14184 10081 / 14260
Branches % 71% 71% 0% :heavy_check_mark:
Complexity 15245 15325 80 :no_entry:

View the full report for further details:

Datadog.Trace Breakdown :heavy_check_mark:

master #3004 Change
Lines % 73% 74% 0% :heavy_check_mark:
Branches % 71% 71% 0% :heavy_check_mark:
Complexity 15245 15325 80 :no_entry:

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.Agent.Transports.HttpStreamRequestFactory -12% :no_entry: 0% :heavy_check_mark: 0 :heavy_check_mark:
Datadog.Trace.Telemetry.Transports.JsonTelemetryTransport -8% :no_entry: 0% :heavy_check_mark: 0 :heavy_check_mark:
Datadog.Trace.DuckTyping.DuckTypePropertyOrFieldNotFoundException 0% :heavy_check_mark: -62% :no_entry: 7 :no_entry:
Datadog.Trace.Ci.CIVisibility 7% :heavy_check_mark: 7% :heavy_check_mark: 0 :heavy_check_mark:

The following classes were added in #3004:

File Line coverage Branch coverage Complexity
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLCommonBase 94% 100% 5
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegration 83% 60% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegrationExtra 100% 100% 1
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateCommon 75% 70% 41
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.Net.ExecuteAsyncIntegration 83% 50% 9
...And 6 more

7 classes were removed from Datadog.Trace in #3004

View the full reports for further details:

andrewlock avatar Aug 05 '22 11:08 andrewlock

Code Coverage Report :bar_chart:

:heavy_check_mark: Merging #3004 into master will not change line coverage :heavy_check_mark: Merging #3004 into master will not change branch coverage :no_entry: Merging #3004 into master will will increase complexity by 80

master #3004 Change
Lines 16839 / 22876 16882 / 22975
Lines % 74% 73% 0% :heavy_check_mark:
Branches 10033 / 14196 10067 / 14272
Branches % 71% 71% 0% :heavy_check_mark:
Complexity 15264 15344 80 :no_entry:

View the full report for further details:

Datadog.Trace Breakdown :heavy_check_mark:

master #3004 Change
Lines % 74% 73% 0% :heavy_check_mark:
Branches % 71% 71% 0% :heavy_check_mark:
Complexity 15264 15344 80 :no_entry:

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.DuckTyping.DuckTypePropertyOrFieldNotFoundException 0% :heavy_check_mark: -62% :no_entry: 7 :no_entry:
Datadog.Trace.Ci.CIVisibility 7% :heavy_check_mark: 7% :heavy_check_mark: 0 :heavy_check_mark:

The following classes were added in #3004:

File Line coverage Branch coverage Complexity
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLCommonBase 94% 100% 5
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegration 83% 60% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegrationExtra 100% 100% 1
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateCommon 75% 70% 41
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.Net.ExecuteAsyncIntegration 83% 50% 9
...And 6 more

7 classes were removed from Datadog.Trace in #3004

View the full reports for further details:

andrewlock avatar Aug 07 '22 16:08 andrewlock

Code Coverage Report :bar_chart:

:heavy_check_mark: Merging #3004 into master will not change line coverage :heavy_check_mark: Merging #3004 into master will not change branch coverage :no_entry: Merging #3004 into master will will increase complexity by 74

master #3004 Change
Lines 16881 / 23226 16925 / 23318
Lines % 73% 73% 0% :heavy_check_mark:
Branches 10068 / 14354 10112 / 14424
Branches % 70% 70% 0% :heavy_check_mark:
Complexity 15449 15523 74 :no_entry:

View the full report for further details:

Datadog.Trace Breakdown :heavy_check_mark:

master #3004 Change
Lines % 73% 73% 0% :heavy_check_mark:
Branches % 70% 70% 0% :heavy_check_mark:
Complexity 15449 15523 74 :no_entry:

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.Ci.GitInfo -17% :no_entry: -11% :no_entry: 0 :heavy_check_mark:
Datadog.Trace.DuckTyping.DuckTypePropertyOrFieldNotFoundException 0% :heavy_check_mark: -62% :no_entry: 7 :no_entry:
Datadog.Trace.Ci.CIVisibility 5% :heavy_check_mark: 6% :heavy_check_mark: 0 :heavy_check_mark:

The following classes were added in #3004:

File Line coverage Branch coverage Complexity
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLCommonBase 96% 100% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegration 83% 60% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegrationExtra 100% 100% 1
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateCommon 70% 65% 35
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.Net.ExecuteAsyncIntegration 83% 50% 9
...And 6 more

7 classes were removed from Datadog.Trace in #3004

View the full reports for further details:

andrewlock avatar Aug 17 '22 17:08 andrewlock

Code Coverage Report :bar_chart:

:heavy_check_mark: Merging #3004 into master will not change line coverage :heavy_check_mark: Merging #3004 into master will not change branch coverage :no_entry: Merging #3004 into master will will increase complexity by 74

master #3004 Change
Lines 16881 / 23226 16977 / 23318
Lines % 73% 73% 0% :heavy_check_mark:
Branches 10068 / 14354 10129 / 14424
Branches % 70% 70% 0% :heavy_check_mark:
Complexity 15449 15523 74 :no_entry:

View the full report for further details:

Datadog.Trace Breakdown :heavy_check_mark:

master #3004 Change
Lines % 73% 73% 0% :heavy_check_mark:
Branches % 70% 70% 0% :heavy_check_mark:
Complexity 15449 15523 74 :no_entry:

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.DuckTyping.DuckTypePropertyOrFieldNotFoundException 0% :heavy_check_mark: -62% :no_entry: 7 :no_entry:
Datadog.Trace.Ci.CIVisibility 5% :heavy_check_mark: 6% :heavy_check_mark: 0 :heavy_check_mark:

The following classes were added in #3004:

File Line coverage Branch coverage Complexity
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLCommonBase 96% 100% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegration 83% 60% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegrationExtra 100% 100% 1
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateCommon 70% 65% 35
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.Net.ExecuteAsyncIntegration 83% 50% 9
...And 6 more

7 classes were removed from Datadog.Trace in #3004

View the full reports for further details:

andrewlock avatar Aug 17 '22 20:08 andrewlock

Code Coverage Report :bar_chart:

:heavy_check_mark: Merging #3004 into master will not change line coverage :heavy_check_mark: Merging #3004 into master will not change branch coverage :no_entry: Merging #3004 into master will will increase complexity by 74

master #3004 Change
Lines 17420 / 23769 17459 / 23861
Lines % 73% 73% 0% :heavy_check_mark:
Branches 10309 / 14621 10368 / 14691
Branches % 71% 71% 0% :heavy_check_mark:
Complexity 15784 15858 74 :no_entry:

View the full report for further details:

Datadog.Trace Breakdown :heavy_check_mark:

master #3004 Change
Lines % 73% 73% 0% :heavy_check_mark:
Branches % 71% 71% 0% :heavy_check_mark:
Complexity 15784 15858 74 :no_entry:

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.Ci.GitInfo -17% :no_entry: -11% :no_entry: 0 :heavy_check_mark:
Datadog.Trace.Telemetry.Transports.JsonTelemetryTransport -9% :no_entry: -17% :no_entry: 0 :heavy_check_mark:
Datadog.Trace.DuckTyping.DuckTypePropertyOrFieldNotFoundException 0% :heavy_check_mark: -62% :no_entry: 7 :no_entry:
Datadog.Trace.Ci.CIVisibility 5% :heavy_check_mark: 6% :heavy_check_mark: 0 :heavy_check_mark:

The following classes were added in #3004:

File Line coverage Branch coverage Complexity
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.GraphQLCommonBase 96% 100% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegration 83% 60% 11
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.ExecuteAsyncIntegrationExtra 100% 100% 1
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.HotChocolate.HotChocolateCommon 70% 65% 35
Datadog.Trace.ClrProfiler.AutoInstrumentation.GraphQL.Net.ExecuteAsyncIntegration 83% 50% 9
...And 6 more

7 classes were removed from Datadog.Trace in #3004

View the full reports for further details:

andrewlock avatar Sep 01 '22 15:09 andrewlock

Benchmarks Report :snail:

Benchmarks for #3004 compared to master:

  • All benchmarks have the same speed
  • 2 benchmarks have more 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 :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net472 714μs 744ns 2.88μs 0.357 0 0 3.18 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 470μs 161ns 601ns 0 0 0 2.58 KB
#3004 WriteAndFlushEnrichedTraces net472 719μs 369ns 1.43μs 0.355 0 0 3.18 KB
#3004 WriteAndFlushEnrichedTraces netcoreapp3.1 466μs 101ns 376ns 0 0 0 2.58 KB
Benchmarks.Trace.AppSecBodyBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net472 185ns 0.145ns 0.521ns 0.0676 0 0 425 B
master AllCycleSimpleBody netcoreapp3.1 236ns 0.344ns 1.33ns 0.00583 0 0 424 B
master AllCycleMoreComplexBody net472 183ns 0.0798ns 0.288ns 0.0638 0 0 401 B
master AllCycleMoreComplexBody netcoreapp3.1 233ns 0.304ns 1.18ns 0.00543 0 0 400 B
master BodyExtractorSimpleBody net472 257ns 0.269ns 1.04ns 0.0573 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 230ns 0.369ns 1.43ns 0.00372 0 0 272 B
master BodyExtractorMoreComplexBody net472 14.2μs 12.9ns 50.1ns 1.21 0.0214 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 12.3μs 11.5ns 44.4ns 0.0927 0 0 6.75 KB
#3004 AllCycleSimpleBody net472 187ns 0.48ns 1.8ns 0.0675 9.21E-05 0 425 B
#3004 AllCycleSimpleBody netcoreapp3.1 239ns 0.261ns 1.01ns 0.00576 0 0 424 B
#3004 AllCycleMoreComplexBody net472 184ns 0.14ns 0.544ns 0.0637 0 0 401 B
#3004 AllCycleMoreComplexBody netcoreapp3.1 234ns 0.18ns 0.674ns 0.00552 0 0 400 B
#3004 BodyExtractorSimpleBody net472 254ns 0.348ns 1.35ns 0.0574 0 0 361 B
#3004 BodyExtractorSimpleBody netcoreapp3.1 221ns 0.266ns 1.03ns 0.0038 0 0 272 B
#3004 BodyExtractorMoreComplexBody net472 14.2μs 8.45ns 31.6ns 1.21 0.0212 0 7.62 KB
#3004 BodyExtractorMoreComplexBody netcoreapp3.1 12.3μs 17.1ns 64ns 0.0919 0 0 6.75 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

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 184μs 302ns 1.17μs 0.184 0 0 20.57 KB
#3004 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#3004 SendRequest netcoreapp3.1 185μs 338ns 1.31μs 0.275 0 0 20.57 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net472 1.94μs 0.461ns 1.73ns 0.15 0.000975 0 947 B
master ExecuteNonQuery netcoreapp3.1 1.44μs 0.432ns 1.67ns 0.0124 0 0 936 B
#3004 ExecuteNonQuery net472 1.78μs 0.743ns 2.88ns 0.15 0.000885 0 947 B
#3004 ExecuteNonQuery netcoreapp3.1 1.47μs 0.415ns 1.5ns 0.0124 0 0 936 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net472 2.38μs 1.21ns 4.67ns 0.184 0 0 1.16 KB
master CallElasticsearch netcoreapp3.1 1.6μs 0.874ns 3.27ns 0.0146 0 0 1.1 KB
master CallElasticsearchAsync net472 2.76μs 1.4ns 5.43ns 0.205 0 0 1.29 KB
master CallElasticsearchAsync netcoreapp3.1 1.58μs 0.709ns 2.74ns 0.0166 0 0 1.22 KB
#3004 CallElasticsearch net472 2.5μs 0.746ns 2.89ns 0.183 0 0 1.16 KB
#3004 CallElasticsearch netcoreapp3.1 1.54μs 0.459ns 1.65ns 0.0147 0 0 1.1 KB
#3004 CallElasticsearchAsync net472 2.68μs 0.606ns 2.35ns 0.205 0 0 1.29 KB
#3004 CallElasticsearchAsync netcoreapp3.1 1.67μs 0.462ns 1.79ns 0.0166 0 0 1.22 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed :heavy_check_mark: More allocations :warning:

More allocations :warning: in #3004

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑netcoreapp3.1 1.34 KB 1.34 KB 8 B 0.60%
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 1.41 KB 1.42 KB 8 B 0.57%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net472 2.7μs 4.34ns 15.7ns 0.223 0 0 1.41 KB
master ExecuteAsync netcoreapp3.1 1.7μs 2.66ns 9.59ns 0.0177 0 0 1.34 KB
#3004 ExecuteAsync net472 2.59μs 7.71ns 29.8ns 0.225 0 0 1.42 KB
#3004 ExecuteAsync netcoreapp3.1 1.71μs 4.01ns 15ns 0.0178 0 0 1.34 KB
Benchmarks.Trace.HttpClientBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net472 5.8μs 14.7ns 57.1ns 0.439 0 0 2.77 KB
master SendAsync netcoreapp3.1 3.76μs 8.64ns 33.4ns 0.0343 0 0 2.6 KB
#3004 SendAsync net472 5.68μs 13.8ns 51.8ns 0.439 0 0 2.77 KB
#3004 SendAsync netcoreapp3.1 3.59μs 7.93ns 30.7ns 0.0349 0 0 2.6 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 3.27μs 3.79ns 14.7ns 0.288 0 0 1.81 KB
master EnrichedLog netcoreapp3.1 2.54μs 1.68ns 6.3ns 0.0254 0 0 1.85 KB
#3004 EnrichedLog net472 3.14μs 2.59ns 10ns 0.288 0 0 1.81 KB
#3004 EnrichedLog netcoreapp3.1 2.54μs 0.736ns 2.65ns 0.0241 0 0 1.85 KB
Benchmarks.Trace.Log4netBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 152μs 162ns 629ns 0.674 0.225 0 4.65 KB
master EnrichedLog netcoreapp3.1 117μs 173ns 669ns 0 0 0 4.49 KB
#3004 EnrichedLog net472 151μs 168ns 651ns 0.683 0.228 0 4.65 KB
#3004 EnrichedLog netcoreapp3.1 117μs 194ns 753ns 0 0 0 4.49 KB
Benchmarks.Trace.NLogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 5.75μs 15.4ns 59.6ns 0.569 0.00292 0 3.59 KB
master EnrichedLog netcoreapp3.1 4.49μs 7.87ns 29.4ns 0.0541 0 0 3.91 KB
#3004 EnrichedLog net472 5.57μs 13.4ns 52.1ns 0.57 0.00279 0 3.59 KB
#3004 EnrichedLog netcoreapp3.1 4.52μs 11.2ns 43.3ns 0.0523 0 0 3.91 KB
Benchmarks.Trace.RedisBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net472 2.37μs 2.21ns 8.57ns 0.217 0 0 1.37 KB
master SendReceive netcoreapp3.1 1.92μs 0.935ns 3.62ns 0.0182 0 0 1.32 KB
#3004 SendReceive net472 2.36μs 6.19ns 21.4ns 0.218 0 0 1.37 KB
#3004 SendReceive netcoreapp3.1 1.83μs 0.592ns 2.22ns 0.0181 0 0 1.32 KB
Benchmarks.Trace.SerilogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 4.89μs 1.79ns 6.45ns 0.353 0 0 2.23 KB
master EnrichedLog netcoreapp3.1 4.36μs 2.29ns 8.26ns 0.024 0 0 1.8 KB
#3004 EnrichedLog net472 5.09μs 1.05ns 3.93ns 0.353 0 0 2.23 KB
#3004 EnrichedLog netcoreapp3.1 4.35μs 1.79ns 6.68ns 0.024 0 0 1.8 KB
Benchmarks.Trace.SpanBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net472 1.17μs 1.73ns 6.69ns 0.129 0 0 810 B
master StartFinishSpan netcoreapp3.1 958ns 0.193ns 0.695ns 0.0105 0 0 760 B
master StartFinishScope net472 1.4μs 1.45ns 5.61ns 0.142 0 0 891 B
master StartFinishScope netcoreapp3.1 1.12μs 0.425ns 1.59ns 0.0118 0 0 880 B
#3004 StartFinishSpan net472 1.22μs 1.06ns 4.1ns 0.129 0 0 810 B
#3004 StartFinishSpan netcoreapp3.1 921ns 0.278ns 1.04ns 0.0102 0 0 760 B
#3004 StartFinishScope net472 1.43μs 1.74ns 6.74ns 0.141 0 0 891 B
#3004 StartFinishScope netcoreapp3.1 1.13μs 0.681ns 2.46ns 0.0119 0 0 880 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net472 1.53μs 0.695ns 2.69ns 0.141 0 0 891 B
master RunOnMethodBegin netcoreapp3.1 1.22μs 0.45ns 1.68ns 0.0121 0 0 880 B
#3004 RunOnMethodBegin net472 1.53μs 0.447ns 1.67ns 0.141 0 0 891 B
#3004 RunOnMethodBegin netcoreapp3.1 1.27μs 0.602ns 2.25ns 0.012 0 0 880 B

andrewlock avatar Sep 01 '22 21:09 andrewlock

Benchmarks Report :snail:

Benchmarks for #3004 compared to master:

  • All benchmarks have the same speed
  • 2 benchmarks have more 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 :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net472 706μs 1.18μs 4.56μs 0.355 0 0 3.18 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 493μs 681ns 2.55μs 0 0 0 2.58 KB
#3004 WriteAndFlushEnrichedTraces net472 721μs 719ns 2.78μs 0.355 0 0 3.18 KB
#3004 WriteAndFlushEnrichedTraces netcoreapp3.1 471μs 619ns 2.4μs 0 0 0 2.58 KB
Benchmarks.Trace.AppSecBodyBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net472 184ns 0.233ns 0.841ns 0.0675 9.25E-05 0 425 B
master AllCycleSimpleBody netcoreapp3.1 239ns 0.298ns 1.15ns 0.00577 0 0 424 B
master AllCycleMoreComplexBody net472 184ns 0.198ns 0.741ns 0.0637 0 0 401 B
master AllCycleMoreComplexBody netcoreapp3.1 234ns 0.285ns 1.1ns 0.00562 0 0 400 B
master BodyExtractorSimpleBody net472 265ns 0.249ns 0.963ns 0.0574 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 221ns 0.243ns 0.877ns 0.00366 0 0 272 B
master BodyExtractorMoreComplexBody net472 14.2μs 12.2ns 45.5ns 1.21 0.0212 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 12.3μs 6.75ns 23.4ns 0.0923 0 0 6.75 KB
#3004 AllCycleSimpleBody net472 187ns 0.526ns 1.97ns 0.0676 9.21E-05 0 425 B
#3004 AllCycleSimpleBody netcoreapp3.1 238ns 0.281ns 1.09ns 0.00573 0 0 424 B
#3004 AllCycleMoreComplexBody net472 184ns 0.159ns 0.593ns 0.0637 0 0 401 B
#3004 AllCycleMoreComplexBody netcoreapp3.1 233ns 0.215ns 0.833ns 0.00556 0 0 400 B
#3004 BodyExtractorSimpleBody net472 258ns 0.395ns 1.53ns 0.0573 0 0 361 B
#3004 BodyExtractorSimpleBody netcoreapp3.1 222ns 0.334ns 1.25ns 0.00366 0 0 272 B
#3004 BodyExtractorMoreComplexBody net472 14.3μs 12.5ns 48.6ns 1.21 0.0214 0 7.62 KB
#3004 BodyExtractorMoreComplexBody netcoreapp3.1 12.1μs 14.3ns 55.4ns 0.0904 0 0 6.75 KB
Benchmarks.Trace.AspNetCoreBenchmark - Unknown :shrug: Same allocations :heavy_check_mark:

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 183μs 126ns 489ns 0.273 0 0 20.57 KB
#3004 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#3004 SendRequest netcoreapp3.1 183μs 140ns 544ns 0.275 0 0 20.57 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net472 1.81μs 3.61ns 14ns 0.15 0.000889 0 947 B
master ExecuteNonQuery netcoreapp3.1 1.51μs 1.67ns 6.48ns 0.0128 0 0 936 B
#3004 ExecuteNonQuery net472 1.79μs 1.45ns 5.6ns 0.15 0.000892 0 947 B
#3004 ExecuteNonQuery netcoreapp3.1 1.47μs 1.13ns 4.36ns 0.0123 0 0 936 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net472 2.54μs 1.43ns 5.53ns 0.183 0 0 1.16 KB
master CallElasticsearch netcoreapp3.1 1.51μs 0.615ns 2.3ns 0.0153 0 0 1.1 KB
master CallElasticsearchAsync net472 2.73μs 0.493ns 1.91ns 0.205 0 0 1.29 KB
master CallElasticsearchAsync netcoreapp3.1 1.62μs 0.828ns 3.1ns 0.0162 0 0 1.22 KB
#3004 CallElasticsearch net472 2.59μs 1.22ns 4.71ns 0.184 0 0 1.16 KB
#3004 CallElasticsearch netcoreapp3.1 1.49μs 0.926ns 3.59ns 0.0149 0 0 1.1 KB
#3004 CallElasticsearchAsync net472 2.56μs 0.47ns 1.82ns 0.205 0 0 1.29 KB
#3004 CallElasticsearchAsync netcoreapp3.1 1.58μs 0.309ns 1.2ns 0.0166 0 0 1.22 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed :heavy_check_mark: More allocations :warning:

More allocations :warning: in #3004

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑netcoreapp3.1 1.34 KB 1.34 KB 8 B 0.60%
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 1.41 KB 1.42 KB 8 B 0.57%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net472 2.54μs 4.45ns 16.7ns 0.224 0 0 1.41 KB
master ExecuteAsync netcoreapp3.1 1.72μs 3.89ns 14.5ns 0.0179 0 0 1.34 KB
#3004 ExecuteAsync net472 2.6μs 5.8ns 22.5ns 0.225 0 0 1.42 KB
#3004 ExecuteAsync netcoreapp3.1 1.71μs 3.95ns 15.3ns 0.0185 0 0 1.34 KB
Benchmarks.Trace.HttpClientBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net472 5.76μs 14.2ns 54.9ns 0.438 0 0 2.77 KB
master SendAsync netcoreapp3.1 3.62μs 8.85ns 34.3ns 0.0343 0 0 2.6 KB
#3004 SendAsync net472 5.71μs 12.8ns 49.6ns 0.439 0 0 2.77 KB
#3004 SendAsync netcoreapp3.1 3.53μs 8.22ns 31.8ns 0.0341 0 0 2.6 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 3.06μs 2.98ns 11.5ns 0.287 0 0 1.81 KB
master EnrichedLog netcoreapp3.1 2.47μs 1.59ns 5.96ns 0.0246 0 0 1.85 KB
#3004 EnrichedLog net472 3.24μs 4.13ns 16ns 0.287 0 0 1.81 KB
#3004 EnrichedLog netcoreapp3.1 2.58μs 1.18ns 4.27ns 0.0245 0 0 1.85 KB
Benchmarks.Trace.Log4netBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 152μs 88.3ns 342ns 0.683 0.228 0 4.65 KB
master EnrichedLog netcoreapp3.1 116μs 138ns 533ns 0 0 0 4.49 KB
#3004 EnrichedLog net472 151μs 125ns 468ns 0.686 0.229 0 4.65 KB
#3004 EnrichedLog netcoreapp3.1 116μs 261ns 1.01μs 0.0587 0 0 4.49 KB
Benchmarks.Trace.NLogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 5.66μs 9.49ns 36.7ns 0.568 0.00284 0 3.59 KB
master EnrichedLog netcoreapp3.1 4.39μs 7.56ns 28.3ns 0.0547 0 0 3.91 KB
#3004 EnrichedLog net472 5.67μs 25ns 97ns 0.568 0.00283 0 3.59 KB
#3004 EnrichedLog netcoreapp3.1 4.41μs 9.21ns 35.7ns 0.0535 0 0 3.91 KB
Benchmarks.Trace.RedisBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net472 2.22μs 1.12ns 4.18ns 0.218 0 0 1.37 KB
master SendReceive netcoreapp3.1 1.88μs 7.85ns 30.4ns 0.0176 0 0 1.32 KB
#3004 SendReceive net472 2.31μs 2.45ns 9.48ns 0.218 0 0 1.37 KB
#3004 SendReceive netcoreapp3.1 1.8μs 1.06ns 3.82ns 0.0179 0 0 1.32 KB
Benchmarks.Trace.SerilogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 5.06μs 0.834ns 3.12ns 0.352 0 0 2.23 KB
master EnrichedLog netcoreapp3.1 4.22μs 0.964ns 3.73ns 0.0233 0 0 1.8 KB
#3004 EnrichedLog net472 4.97μs 2.37ns 9.17ns 0.352 0 0 2.23 KB
#3004 EnrichedLog netcoreapp3.1 4.45μs 1.52ns 5.7ns 0.0243 0 0 1.8 KB
Benchmarks.Trace.SpanBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net472 1.18μs 0.447ns 1.67ns 0.129 0 0 810 B
master StartFinishSpan netcoreapp3.1 1.01μs 0.213ns 0.767ns 0.0101 0 0 760 B
master StartFinishScope net472 1.37μs 0.645ns 2.41ns 0.141 0 0 891 B
master StartFinishScope netcoreapp3.1 1.09μs 0.316ns 1.14ns 0.0116 0 0 880 B
#3004 StartFinishSpan net472 1.19μs 0.361ns 1.4ns 0.128 0 0 810 B
#3004 StartFinishSpan netcoreapp3.1 918ns 0.443ns 1.71ns 0.0102 0 0 760 B
#3004 StartFinishScope net472 1.42μs 0.581ns 2.17ns 0.141 0 0 891 B
#3004 StartFinishScope netcoreapp3.1 1.14μs 10.7ns 101ns 0.0117 0 0 880 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net472 1.51μs 0.623ns 2.41ns 0.141 0 0 891 B
master RunOnMethodBegin netcoreapp3.1 1.25μs 0.423ns 1.58ns 0.0119 0 0 880 B
#3004 RunOnMethodBegin net472 1.48μs 0.502ns 1.88ns 0.142 0 0 891 B
#3004 RunOnMethodBegin netcoreapp3.1 1.19μs 0.835ns 3.23ns 0.0119 0 0 880 B

andrewlock avatar Sep 02 '22 13:09 andrewlock