-
Notifications
You must be signed in to change notification settings - Fork 152
Protect against NullReferenceExceptions
in AWS S3 Integration
#7365
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
base: master
Are you sure you want to change the base?
Conversation
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7365) - mean (73ms) : 72, 75
. : milestone, 73,
master - mean (73ms) : 72, 75
. : milestone, 73,
section Baseline
This PR (7365) - mean (70ms) : 64, 77
. : milestone, 70,
master - mean (70ms) : 65, 76
. : milestone, 70,
section CallTarget+Inlining+NGEN
This PR (7365) - mean (999ms) : 961, 1036
. : milestone, 999,
master - mean (998ms) : 976, 1021
. : milestone, 998,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7365) - mean (108ms) : 107, 110
. : milestone, 108,
master - mean (110ms) : 108, 111
. : milestone, 110,
section Baseline
This PR (7365) - mean (108ms) : 104, 111
. : milestone, 108,
master - mean (109ms) : 106, 111
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (7365) - mean (706ms) : 683, 728
. : milestone, 706,
master - mean (708ms) : 689, 726
. : milestone, 708,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7365) - mean (96ms) : 94, 97
. : milestone, 96,
master - mean (96ms) : 95, 98
. : milestone, 96,
section Baseline
This PR (7365) - mean (95ms) : 93, 98
. : milestone, 95,
master - mean (95ms) : 93, 98
. : milestone, 95,
section CallTarget+Inlining+NGEN
This PR (7365) - mean (657ms) : 640, 673
. : milestone, 657,
master - mean (662ms) : 642, 683
. : milestone, 662,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7365) - mean (95ms) : 94, 96
. : milestone, 95,
master - mean (96ms) : 94, 97
. : milestone, 96,
section Baseline
This PR (7365) - mean (94ms) : 91, 97
. : milestone, 94,
master - mean (95ms) : 93, 97
. : milestone, 95,
section CallTarget+Inlining+NGEN
This PR (7365) - mean (595ms) : 582, 607
. : milestone, 595,
master - mean (604ms) : 592, 615
. : milestone, 604,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7365) - mean (197ms) : 195, 200
. : milestone, 197,
master - mean (199ms) : 196, 202
. : milestone, 199,
section Baseline
This PR (7365) - mean (195ms) : 189, 201
. : milestone, 195,
master - mean (197ms) : 189, 205
. : milestone, 197,
section CallTarget+Inlining+NGEN
This PR (7365) - mean (1,111ms) : 1076, 1146
. : milestone, 1111,
master - mean (1,122ms) : 1086, 1158
. : milestone, 1122,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7365) - mean (282ms) : 276, 288
. : milestone, 282,
master - mean (284ms) : 277, 291
. : milestone, 284,
section Baseline
This PR (7365) - mean (280ms) : 276, 285
. : milestone, 280,
master - mean (282ms) : 275, 289
. : milestone, 282,
section CallTarget+Inlining+NGEN
This PR (7365) - mean (903ms) : 875, 931
. : milestone, 903,
master - mean (913ms) : 876, 950
. : milestone, 913,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7365) - mean (274ms) : 269, 279
. : milestone, 274,
master - mean (275ms) : 268, 283
. : milestone, 275,
section Baseline
This PR (7365) - mean (273ms) : 268, 277
. : milestone, 273,
master - mean (274ms) : 269, 279
. : milestone, 274,
section CallTarget+Inlining+NGEN
This PR (7365) - mean (881ms) : 856, 907
. : milestone, 881,
master - mean (900ms) : 861, 939
. : milestone, 900,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7365) - mean (272ms) : 268, 277
. : milestone, 272,
master - mean (276ms) : 268, 283
. : milestone, 276,
section Baseline
This PR (7365) - mean (273ms) : 266, 279
. : milestone, 273,
master - mean (274ms) : 268, 280
. : milestone, 274,
section CallTarget+Inlining+NGEN
This PR (7365) - mean (798ms) : 767, 830
. : milestone, 798,
master - mean (812ms) : 781, 844
. : milestone, 812,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'm a bit torn on the testing, but I think it would be preferable to include it if it's not too much hassle
return new CallTargetState(scope, request); | ||
} | ||
|
||
internal static TReturn? OnAsyncMethodEnd<TTarget, TReturn>(TTarget instance, TReturn? returnValue, Exception exception, in CallTargetState state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking that TReturn should be non-nullable in this case too, seeing as it can never be null🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering that too, but wasn't 100% sure
I'll swap it to be non-nullable while adding test cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the TReturn?
in the params of the files I touched to be TReturn
and also added some tests that would throw the exception by pointing to an invalid endpoint.
Issue at the moment is the tests are quite slow so I'll follow up on that in a next PR
And for some reason throwing that caused the .NET Framework sample to hang 😭 so disabled those, will follow up on those as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay they don't hang, but they end up taking ~8minutes per test run so something to do with the timeouts
I'll plan on reducing the test cases for the invalid endpoints for a PR next week
3eae050
to
5c44055
Compare
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. 1 occurrences of : + },
+ {
+ TraceId: Id_18,
+ SpanId: Id_19,
+ Name: async-methods-duck-typing-error,
+ Resource: async-methods-duck-typing-error,
+ Service: Samples.AWS.S3,
+ Tags: {
+ env: integration_tests,
+ language: dotnet,
+ runtime-id: Guid_1
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_20,
+ Name: s3.request,
+ Resource: S3.PutBucket,
+ Service: Samples.AWS.S3-aws-s3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: PutBucket,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: PUT,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/,
+ language: dotnet,
+ runtime-id: Guid_1,
+ span.kind: client,
+ _dd.base_service: Samples.AWS.S3
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_21,
+ Name: s3.request,
+ Resource: S3.PutObject,
+ Service: Samples.AWS.S3-aws-s3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: PutObject,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: PUT,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/sample.txt,
+ language: dotnet,
+ objectkey: sample.txt,
+ runtime-id: Guid_1,
+ span.kind: client,
+ _dd.base_service: Samples.AWS.S3
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_22,
+ Name: s3.request,
+ Resource: S3.GetObject,
+ Service: Samples.AWS.S3-aws-s3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: GetObject,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: GET,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/sample.txt,
+ language: dotnet,
+ objectkey: sample.txt,
+ runtime-id: Guid_1,
+ span.kind: client,
+ _dd.base_service: Samples.AWS.S3
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_23,
+ Name: s3.request,
+ Resource: S3.CopyObject,
+ Service: Samples.AWS.S3-aws-s3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: CopyObject,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: PUT,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/copy.txt,
+ language: dotnet,
+ objectkey: copy.txt,
+ runtime-id: Guid_1,
+ span.kind: client,
+ _dd.base_service: Samples.AWS.S3
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_24,
+ Name: s3.request,
+ Resource: S3.ListObjectsV2,
+ Service: Samples.AWS.S3-aws-s3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: ListObjectsV2,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: GET,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/,
+ language: dotnet,
+ runtime-id: Guid_1,
+ span.kind: client,
+ _dd.base_service: Samples.AWS.S3
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_25,
+ Name: s3.request,
+ Resource: S3.DeleteObject,
+ Service: Samples.AWS.S3-aws-s3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: DeleteObject,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: DELETE,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/copy.txt,
+ language: dotnet,
+ objectkey: copy.txt,
+ runtime-id: Guid_1,
+ span.kind: client,
+ _dd.base_service: Samples.AWS.S3
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_26,
+ Name: s3.request,
+ Resource: S3.DeleteObjects,
+ Service: Samples.AWS.S3-aws-s3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: DeleteObjects,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: POST,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/,
+ language: dotnet,
+ runtime-id: Guid_1,
+ span.kind: client,
+ _dd.base_service: Samples.AWS.S3
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_27,
+ Name: s3.request,
+ Resource: S3.ListBuckets,
+ Service: Samples.AWS.S3-aws-s3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: ListBuckets,
+ aws.service: S3,
+ aws_service: S3,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: GET,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/,
+ language: dotnet,
+ runtime-id: Guid_1,
+ span.kind: client,
+ _dd.base_service: Samples.AWS.S3
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_28,
+ Name: s3.request,
+ Resource: S3.ListObjectsV2,
+ Service: Samples.AWS.S3-aws-s3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: ListObjectsV2,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: GET,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/,
+ language: dotnet,
+ runtime-id: Guid_1,
+ span.kind: client,
+ _dd.base_service: Samples.AWS.S3
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
1 occurrences of : + },
+ {
+ TraceId: Id_18,
+ SpanId: Id_19,
+ Name: async-methods-duck-typing-error,
+ Resource: async-methods-duck-typing-error,
+ Service: Samples.AWS.S3,
+ Tags: {
+ env: integration_tests,
+ language: dotnet,
+ runtime-id: Guid_1
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_20,
+ Name: aws.s3.request,
+ Resource: S3.PutBucket,
+ Service: Samples.AWS.S3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: PutBucket,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: PUT,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/,
+ language: dotnet,
+ peer.service: my-bucket,
+ span.kind: client,
+ _dd.peer.service.source: my-bucket
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_21,
+ Name: aws.s3.request,
+ Resource: S3.PutObject,
+ Service: Samples.AWS.S3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: PutObject,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: PUT,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/sample.txt,
+ language: dotnet,
+ objectkey: sample.txt,
+ peer.service: my-bucket,
+ span.kind: client,
+ _dd.peer.service.source: my-bucket
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_22,
+ Name: aws.s3.request,
+ Resource: S3.GetObject,
+ Service: Samples.AWS.S3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: GetObject,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: GET,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/sample.txt,
+ language: dotnet,
+ objectkey: sample.txt,
+ peer.service: my-bucket,
+ span.kind: client,
+ _dd.peer.service.source: my-bucket
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_23,
+ Name: aws.s3.request,
+ Resource: S3.CopyObject,
+ Service: Samples.AWS.S3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: CopyObject,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: PUT,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/copy.txt,
+ language: dotnet,
+ objectkey: copy.txt,
+ peer.service: my-bucket,
+ span.kind: client,
+ _dd.peer.service.source: my-bucket
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_24,
+ Name: aws.s3.request,
+ Resource: S3.ListObjectsV2,
+ Service: Samples.AWS.S3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: ListObjectsV2,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: GET,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/,
+ language: dotnet,
+ peer.service: my-bucket,
+ span.kind: client,
+ _dd.peer.service.source: my-bucket
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_25,
+ Name: aws.s3.request,
+ Resource: S3.DeleteObject,
+ Service: Samples.AWS.S3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: DeleteObject,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: DELETE,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/copy.txt,
+ language: dotnet,
+ objectkey: copy.txt,
+ peer.service: my-bucket,
+ span.kind: client,
+ _dd.peer.service.source: my-bucket
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_26,
+ Name: aws.s3.request,
+ Resource: S3.DeleteObjects,
+ Service: Samples.AWS.S3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: DeleteObjects,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: POST,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/,
+ language: dotnet,
+ peer.service: my-bucket,
+ span.kind: client,
+ _dd.peer.service.source: my-bucket
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_27,
+ Name: aws.s3.request,
+ Resource: S3.ListBuckets,
+ Service: Samples.AWS.S3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: ListBuckets,
+ aws.service: S3,
+ aws_service: S3,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: GET,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/,
+ language: dotnet,
+ span.kind: client
+ }
+ },
+ {
+ TraceId: Id_18,
+ SpanId: Id_28,
+ Name: aws.s3.request,
+ Resource: S3.ListObjectsV2,
+ Service: Samples.AWS.S3,
+ Type: http,
+ ParentId: Id_19,
+ Error: 1,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: ListObjectsV2,
+ aws.service: S3,
+ aws_service: S3,
+ bucketname: my-bucket,
+ component: aws-sdk,
+ env: integration_tests,
+ error.msg: No such host is known. (no-such-host-is-known-is-expected-if-you-see-it:9999),
+ error.stack:
[...]
+ error.type: System.Net.Http.HttpRequestException,
+ http.method: GET,
+ http.url: http://no-such-host-is-known-is-expected-if-you-see-it:9999/my-bucket/,
+ language: dotnet,
+ peer.service: my-bucket,
+ span.kind: client,
+ _dd.peer.service.source: my-bucket
+ }
|
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7365 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ More allocations
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 | 5.65 KB | 5.69 KB | 39 B | 0.69% |
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.08 KB | 6.03 KB | -48 B | -0.79% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartStopWithChild |
net6.0 | 10.3μs | 57.3ns | 358ns | 0 | 0 | 0 | 5.49 KB |
master | StartStopWithChild |
netcoreapp3.1 | 13.3μs | 70.3ns | 372ns | 0 | 0 | 0 | 5.65 KB |
master | StartStopWithChild |
net472 | 21.4μs | 102ns | 395ns | 0.876 | 0.219 | 0 | 6.08 KB |
#7365 | StartStopWithChild |
net6.0 | 10.7μs | 58.2ns | 344ns | 0 | 0 | 0 | 5.5 KB |
#7365 | StartStopWithChild |
netcoreapp3.1 | 13.3μs | 65.7ns | 286ns | 0 | 0 | 0 | 5.69 KB |
#7365 | StartStopWithChild |
net472 | 21.8μs | 119ns | 664ns | 1.01 | 0.336 | 0.112 | 6.03 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 919μs | 148ns | 554ns | 0 | 0 | 0 | 2.71 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.04ms | 267ns | 1E+03ns | 0 | 0 | 0 | 2.7 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 1.31μs | 5.06μs | 0 | 0 | 0 | 3.31 KB |
#7365 | WriteAndFlushEnrichedTraces |
net6.0 | 912μs | 58.1ns | 225ns | 0 | 0 | 0 | 2.7 KB |
#7365 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 191ns | 716ns | 0 | 0 | 0 | 2.7 KB |
#7365 | WriteAndFlushEnrichedTraces |
net472 | 1.22ms | 590ns | 2.29μs | 0 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | AllCycleSimpleBody |
net6.0 | 322μs | 1.42μs | 5.49μs | 0 | 0 | 0 | 172.07 KB |
master | AllCycleSimpleBody |
netcoreapp3.1 | 495μs | 558ns | 1.93μs | 0 | 0 | 0 | 174.18 KB |
master | AllCycleSimpleBody |
net472 | 427μs | 177ns | 684ns | 29.2 | 0 | 0 | 194.24 KB |
master | AllCycleMoreComplexBody |
net6.0 | 326μs | 208ns | 778ns | 0 | 0 | 0 | 175.58 KB |
master | AllCycleMoreComplexBody |
netcoreapp3.1 | 462μs | 1.07μs | 4.13μs | 0 | 0 | 0 | 177.6 KB |
master | AllCycleMoreComplexBody |
net472 | 432μs | 150ns | 580ns | 30.2 | 0 | 0 | 197.76 KB |
master | ObjectExtractorSimpleBody |
net6.0 | 319ns | 1.52ns | 6.47ns | 0 | 0 | 0 | 280 B |
master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 403ns | 2.09ns | 10.7ns | 0 | 0 | 0 | 272 B |
master | ObjectExtractorSimpleBody |
net472 | 304ns | 0.0937ns | 0.338ns | 0.0444 | 0 | 0 | 281 B |
master | ObjectExtractorMoreComplexBody |
net6.0 | 6.34μs | 22.8ns | 88.1ns | 0 | 0 | 0 | 3.78 KB |
master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.81μs | 37ns | 143ns | 0 | 0 | 0 | 3.69 KB |
master | ObjectExtractorMoreComplexBody |
net472 | 6.71μs | 2.81ns | 10.9ns | 0.57 | 0 | 0 | 3.8 KB |
#7365 | AllCycleSimpleBody |
net6.0 | 321μs | 214ns | 741ns | 0 | 0 | 0 | 172.07 KB |
#7365 | AllCycleSimpleBody |
netcoreapp3.1 | 463μs | 179ns | 619ns | 0 | 0 | 0 | 174.18 KB |
#7365 | AllCycleSimpleBody |
net472 | 428μs | 87.4ns | 315ns | 29.2 | 0 | 0 | 194.24 KB |
#7365 | AllCycleMoreComplexBody |
net6.0 | 334μs | 158ns | 612ns | 0 | 0 | 0 | 175.58 KB |
#7365 | AllCycleMoreComplexBody |
netcoreapp3.1 | 477μs | 1.58μs | 5.91μs | 0 | 0 | 0 | 177.6 KB |
#7365 | AllCycleMoreComplexBody |
net472 | 434μs | 143ns | 535ns | 30.2 | 0 | 0 | 197.76 KB |
#7365 | ObjectExtractorSimpleBody |
net6.0 | 313ns | 1.62ns | 8.43ns | 0 | 0 | 0 | 280 B |
#7365 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 393ns | 2.23ns | 14.8ns | 0 | 0 | 0 | 272 B |
#7365 | ObjectExtractorSimpleBody |
net472 | 297ns | 0.0482ns | 0.187ns | 0.0434 | 0 | 0 | 281 B |
#7365 | ObjectExtractorMoreComplexBody |
net6.0 | 6.24μs | 33.4ns | 177ns | 0 | 0 | 0 | 3.79 KB |
#7365 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.79μs | 33.7ns | 126ns | 0 | 0 | 0 | 3.69 KB |
#7365 | ObjectExtractorMoreComplexBody |
net472 | 6.73μs | 7.3ns | 28.3ns | 0.575 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EncodeArgs |
net6.0 | 77.7μs | 214ns | 828ns | 0 | 0 | 0 | 32.4 KB |
master | EncodeArgs |
netcoreapp3.1 | 96.6μs | 26.3ns | 98.4ns | 0 | 0 | 0 | 32.4 KB |
master | EncodeArgs |
net472 | 109μs | 7.94ns | 29.7ns | 4.93 | 0 | 0 | 32.51 KB |
master | EncodeLegacyArgs |
net6.0 | 145μs | 25.9ns | 97.1ns | 0 | 0 | 0 | 2.15 KB |
master | EncodeLegacyArgs |
netcoreapp3.1 | 195μs | 107ns | 416ns | 0 | 0 | 0 | 2.14 KB |
master | EncodeLegacyArgs |
net472 | 263μs | 158ns | 611ns | 0 | 0 | 0 | 2.16 KB |
#7365 | EncodeArgs |
net6.0 | 75.7μs | 210ns | 787ns | 0 | 0 | 0 | 32.4 KB |
#7365 | EncodeArgs |
netcoreapp3.1 | 98μs | 300ns | 1.16μs | 0 | 0 | 0 | 32.4 KB |
#7365 | EncodeArgs |
net472 | 109μs | 95.9ns | 371ns | 4.92 | 0 | 0 | 32.5 KB |
#7365 | EncodeLegacyArgs |
net6.0 | 140μs | 141ns | 547ns | 0 | 0 | 0 | 2.15 KB |
#7365 | EncodeLegacyArgs |
netcoreapp3.1 | 203μs | 188ns | 728ns | 0 | 0 | 0 | 2.14 KB |
#7365 | EncodeLegacyArgs |
net472 | 268μs | 231ns | 863ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #7365
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
1.717
515,440.40
300,119.35
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 1.717 | 515,440.40 | 300,119.35 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunWafRealisticBenchmark |
net6.0 | 394μs | 46.2ns | 179ns | 0 | 0 | 0 | 4.55 KB |
master | RunWafRealisticBenchmark |
netcoreapp3.1 | 417μs | 142ns | 550ns | 0 | 0 | 0 | 4.48 KB |
master | RunWafRealisticBenchmark |
net472 | 435μs | 84.1ns | 315ns | 0 | 0 | 0 | 4.66 KB |
master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 290μs | 64.5ns | 250ns | 0 | 0 | 0 | 2.24 KB |
master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 490μs | 6.85μs | 68.5μs | 0 | 0 | 0 | 2.22 KB |
master | RunWafRealisticBenchmarkWithAttack |
net472 | 315μs | 44.7ns | 167ns | 0 | 0 | 0 | 2.29 KB |
#7365 | RunWafRealisticBenchmark |
net6.0 | 401μs | 87ns | 326ns | 0 | 0 | 0 | 4.55 KB |
#7365 | RunWafRealisticBenchmark |
netcoreapp3.1 | 412μs | 254ns | 983ns | 0 | 0 | 0 | 4.48 KB |
#7365 | RunWafRealisticBenchmark |
net472 | 433μs | 52.4ns | 203ns | 0 | 0 | 0 | 4.66 KB |
#7365 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 297μs | 261ns | 1.01μs | 0 | 0 | 0 | 2.24 KB |
#7365 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 300μs | 141ns | 547ns | 0 | 0 | 0 | 2.22 KB |
#7365 | RunWafRealisticBenchmarkWithAttack |
net472 | 312μs | 58.5ns | 226ns | 0 | 0 | 0 | 2.29 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 |
net6.0 | 60.7μs | 62.9ns | 227ns | 0 | 0 | 0 | 14.52 KB |
master | SendRequest |
netcoreapp3.1 | 70μs | 159ns | 573ns | 0 | 0 | 0 | 17.42 KB |
master | SendRequest |
net472 | 0.00903ns | 0.00245ns | 0.00949ns | 0 | 0 | 0 | 0 b |
#7365 | SendRequest |
net6.0 | 60.3μs | 87.4ns | 315ns | 0 | 0 | 0 | 14.52 KB |
#7365 | SendRequest |
netcoreapp3.1 | 70.9μs | 178ns | 640ns | 0 | 0 | 0 | 17.42 KB |
#7365 | SendRequest |
net472 | 0.0108ns | 0.00245ns | 0.00949ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ Fewer allocations 🎉
Slower ⚠️ in #7365
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
1.119
799,441.67
894,256.97
Faster 🎉 in #7365
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
1.137
939,487.79
826,371.07
Fewer allocations 🎉 in #7365
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
7 B
2 B
-5 B
-71.43%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
4 B
1 B
-3 B
-75.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
73 B
0 b
-73 B
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
47 B
0 b
-47 B
-100.00%
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 1.119 | 799,441.67 | 894,256.97 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 1.137 | 939,487.79 | 826,371.07 |
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 7 B | 2 B | -5 B | -71.43% |
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 4 B | 1 B | -3 B | -75.00% |
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 73 B | 0 b | -73 B | -100.00% |
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 47 B | 0 b | -47 B | -100.00% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | OriginalCharSlice |
net6.0 | 1.93ms | 4.3μs | 15.5μs | 0 | 0 | 0 | 640.01 KB |
master | OriginalCharSlice |
netcoreapp3.1 | 2.1ms | 5.17μs | 20μs | 0 | 0 | 0 | 640 KB |
master | OriginalCharSlice |
net472 | 2.69ms | 679ns | 2.54μs | 100 | 0 | 0 | 641.95 KB |
master | OptimizedCharSlice |
net6.0 | 1.37ms | 368ns | 1.42μs | 0 | 0 | 0 | 7 B |
master | OptimizedCharSlice |
netcoreapp3.1 | 1.67ms | 1.95μs | 7.56μs | 0 | 0 | 0 | 1 B |
master | OptimizedCharSlice |
net472 | 1.95ms | 250ns | 936ns | 0 | 0 | 0 | 73 B |
master | OptimizedCharSliceWithPool |
net6.0 | 799μs | 31ns | 116ns | 0 | 0 | 0 | 4 B |
master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 936μs | 4.37μs | 16.9μs | 0 | 0 | 0 | 0 b |
master | OptimizedCharSliceWithPool |
net472 | 1.15ms | 109ns | 424ns | 0 | 0 | 0 | 47 B |
#7365 | OriginalCharSlice |
net6.0 | 1.93ms | 3.1μs | 11.2μs | 0 | 0 | 0 | 640.01 KB |
#7365 | OriginalCharSlice |
netcoreapp3.1 | 2.11ms | 9.98μs | 41.2μs | 0 | 0 | 0 | 640 KB |
#7365 | OriginalCharSlice |
net472 | 2.77ms | 236ns | 882ns | 100 | 0 | 0 | 641.95 KB |
#7365 | OptimizedCharSlice |
net6.0 | 1.42ms | 502ns | 1.95μs | 0 | 0 | 0 | 2 B |
#7365 | OptimizedCharSlice |
netcoreapp3.1 | 1.71ms | 281ns | 1.09μs | 0 | 0 | 0 | 1 B |
#7365 | OptimizedCharSlice |
net472 | 1.99ms | 515ns | 1.99μs | 0 | 0 | 0 | 0 b |
#7365 | OptimizedCharSliceWithPool |
net6.0 | 894μs | 41ns | 159ns | 0 | 0 | 0 | 1 B |
#7365 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 826μs | 60.1ns | 233ns | 0 | 0 | 0 | 0 b |
#7365 | OptimizedCharSliceWithPool |
net472 | 1.17ms | 69.1ns | 268ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 748μs | 4.13μs | 27.1μs | 0 | 0 | 0 | 41.76 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 676μs | 3.52μs | 17.2μs | 0 | 0 | 0 | 41.98 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 907μs | 1.63μs | 5.87μs | 4.46 | 0 | 0 | 56.01 KB |
#7365 | WriteAndFlushEnrichedTraces |
net6.0 | 702μs | 628ns | 2.43μs | 0 | 0 | 0 | 41.79 KB |
#7365 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 691μs | 3.75μs | 20.6μs | 0 | 0 | 0 | 41.93 KB |
#7365 | WriteAndFlushEnrichedTraces |
net472 | 979μs | 4.82μs | 21μs | 4.81 | 0 | 0 | 55.91 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 |
net6.0 | 1.81μs | 2.28ns | 8.21ns | 0 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
netcoreapp3.1 | 2.52μs | 7.27ns | 28.1ns | 0 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
net472 | 2.8μs | 3.72ns | 14.4ns | 0.152 | 0.0138 | 0 | 987 B |
#7365 | ExecuteNonQuery |
net6.0 | 1.86μs | 4.38ns | 16.9ns | 0 | 0 | 0 | 1.02 KB |
#7365 | ExecuteNonQuery |
netcoreapp3.1 | 2.62μs | 3.37ns | 13.1ns | 0 | 0 | 0 | 1.02 KB |
#7365 | ExecuteNonQuery |
net472 | 2.72μs | 3.92ns | 15.2ns | 0.146 | 0.0132 | 0 | 987 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 |
net6.0 | 1.71μs | 6.35ns | 24.6ns | 0 | 0 | 0 | 1.03 KB |
master | CallElasticsearch |
netcoreapp3.1 | 2.29μs | 6.52ns | 25.2ns | 0 | 0 | 0 | 1.03 KB |
master | CallElasticsearch |
net472 | 3.58μs | 2.87ns | 11.1ns | 0.161 | 0 | 0 | 1.04 KB |
master | CallElasticsearchAsync |
net6.0 | 1.86μs | 2.13ns | 8.25ns | 0 | 0 | 0 | 1.01 KB |
master | CallElasticsearchAsync |
netcoreapp3.1 | 2.34μs | 7.52ns | 29.1ns | 0 | 0 | 0 | 1.08 KB |
master | CallElasticsearchAsync |
net472 | 3.71μs | 0.559ns | 2.16ns | 0.168 | 0 | 0 | 1.1 KB |
#7365 | CallElasticsearch |
net6.0 | 1.7μs | 1.13ns | 4.37ns | 0 | 0 | 0 | 1.03 KB |
#7365 | CallElasticsearch |
netcoreapp3.1 | 2.27μs | 10ns | 38.8ns | 0 | 0 | 0 | 1.03 KB |
#7365 | CallElasticsearch |
net472 | 3.6μs | 1.18ns | 4.24ns | 0.163 | 0 | 0 | 1.04 KB |
#7365 | CallElasticsearchAsync |
net6.0 | 1.79μs | 9ns | 41.2ns | 0 | 0 | 0 | 1.01 KB |
#7365 | CallElasticsearchAsync |
netcoreapp3.1 | 2.37μs | 12.1ns | 54.1ns | 0 | 0 | 0 | 1.08 KB |
#7365 | CallElasticsearchAsync |
net472 | 3.76μs | 1.67ns | 6.03ns | 0.169 | 0 | 0 | 1.1 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 |
net6.0 | 1.84μs | 3.33ns | 12.9ns | 0 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 2.48μs | 7.11ns | 26.6ns | 0 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 2.57μs | 2.99ns | 11.6ns | 0.141 | 0 | 0 | 915 B |
#7365 | ExecuteAsync |
net6.0 | 1.83μs | 7.58ns | 28.3ns | 0 | 0 | 0 | 952 B |
#7365 | ExecuteAsync |
netcoreapp3.1 | 2.26μs | 7.34ns | 28.4ns | 0 | 0 | 0 | 952 B |
#7365 | ExecuteAsync |
net472 | 2.5μs | 1.57ns | 6.09ns | 0.138 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendAsync |
net6.0 | 6.98μs | 12ns | 46.4ns | 0 | 0 | 0 | 2.36 KB |
master | SendAsync |
netcoreapp3.1 | 8.31μs | 14.6ns | 56.6ns | 0 | 0 | 0 | 2.9 KB |
master | SendAsync |
net472 | 12.5μs | 7.26ns | 28.1ns | 0.497 | 0 | 0 | 3.18 KB |
#7365 | SendAsync |
net6.0 | 7μs | 7.1ns | 26.6ns | 0 | 0 | 0 | 2.36 KB |
#7365 | SendAsync |
netcoreapp3.1 | 8.48μs | 9.52ns | 36.9ns | 0 | 0 | 0 | 2.9 KB |
#7365 | SendAsync |
net472 | 12.1μs | 8.62ns | 32.3ns | 0.486 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7365
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.1 KB
43.94 KB
840 B
1.95%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
254.89 KB
258.23 KB
3.34 KB
1.31%
Fewer allocations 🎉 in #7365
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
44.2 KB
42.89 KB
-1.31 KB
-2.97%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
286.72 KB
275.42 KB
-11.3 KB
-3.94%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
277.83 KB
255.43 KB
-22.4 KB
-8.06%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.1 KB | 43.94 KB | 840 B | 1.95% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 254.89 KB | 258.23 KB | 3.34 KB | 1.31% |
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 44.2 KB | 42.89 KB | -1.31 KB | -2.97% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 286.72 KB | 275.42 KB | -11.3 KB | -3.94% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 277.83 KB | 255.43 KB | -22.4 KB | -8.06% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 48μs | 237ns | 1.4μs | 0 | 0 | 0 | 43.1 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 53.3μs | 654ns | 6.44μs | 0 | 0 | 0 | 44.2 KB |
master | StringConcatBenchmark |
net472 | 57.1μs | 217ns | 783ns | 0 | 0 | 0 | 65.54 KB |
master | StringConcatAspectBenchmark |
net6.0 | 475μs | 1.67μs | 7.29μs | 0 | 0 | 0 | 277.83 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 497μs | 2.46μs | 10.1μs | 0 | 0 | 0 | 254.89 KB |
master | StringConcatAspectBenchmark |
net472 | 406μs | 2.11μs | 10.1μs | 0 | 0 | 0 | 286.72 KB |
#7365 | StringConcatBenchmark |
net6.0 | 44.3μs | 241ns | 1.4μs | 0 | 0 | 0 | 43.94 KB |
#7365 | StringConcatBenchmark |
netcoreapp3.1 | 52.2μs | 573ns | 5.47μs | 0 | 0 | 0 | 42.89 KB |
#7365 | StringConcatBenchmark |
net472 | 57.7μs | 256ns | 993ns | 0 | 0 | 0 | 65.54 KB |
#7365 | StringConcatAspectBenchmark |
net6.0 | 442μs | 1.61μs | 8.53μs | 0 | 0 | 0 | 255.43 KB |
#7365 | StringConcatAspectBenchmark |
netcoreapp3.1 | 503μs | 2.21μs | 8.27μs | 0 | 0 | 0 | 258.23 KB |
#7365 | StringConcatAspectBenchmark |
net472 | 408μs | 2.18μs | 11.9μs | 0 | 0 | 0 | 275.42 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 |
net6.0 | 2.58μs | 4.21ns | 16.3ns | 0 | 0 | 0 | 1.7 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.4μs | 2.85ns | 11ns | 0 | 0 | 0 | 1.7 KB |
master | EnrichedLog |
net472 | 4.03μs | 4.03ns | 15.6ns | 0.242 | 0 | 0 | 1.64 KB |
#7365 | EnrichedLog |
net6.0 | 2.48μs | 13.1ns | 64.2ns | 0 | 0 | 0 | 1.7 KB |
#7365 | EnrichedLog |
netcoreapp3.1 | 3.38μs | 16.1ns | 64.3ns | 0 | 0 | 0 | 1.7 KB |
#7365 | EnrichedLog |
net472 | 4.06μs | 3.97ns | 15.4ns | 0.245 | 0 | 0 | 1.64 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 |
net6.0 | 123μs | 247ns | 955ns | 0 | 0 | 0 | 4.31 KB |
master | EnrichedLog |
netcoreapp3.1 | 128μs | 125ns | 433ns | 0 | 0 | 0 | 4.31 KB |
master | EnrichedLog |
net472 | 166μs | 19.9ns | 71.9ns | 0 | 0 | 0 | 4.51 KB |
#7365 | EnrichedLog |
net6.0 | 120μs | 52.9ns | 205ns | 0 | 0 | 0 | 4.31 KB |
#7365 | EnrichedLog |
netcoreapp3.1 | 127μs | 72.3ns | 270ns | 0 | 0 | 0 | 4.31 KB |
#7365 | EnrichedLog |
net472 | 166μs | 149ns | 577ns | 0 | 0 | 0 | 4.52 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 |
net6.0 | 4.94μs | 7.32ns | 28.3ns | 0 | 0 | 0 | 2.26 KB |
master | EnrichedLog |
netcoreapp3.1 | 6.53μs | 19.5ns | 75.4ns | 0 | 0 | 0 | 2.26 KB |
master | EnrichedLog |
net472 | 7.44μs | 7.63ns | 29.5ns | 0.297 | 0 | 0 | 2.08 KB |
#7365 | EnrichedLog |
net6.0 | 5.05μs | 12.6ns | 48.8ns | 0 | 0 | 0 | 2.26 KB |
#7365 | EnrichedLog |
netcoreapp3.1 | 6.74μs | 20.3ns | 78.6ns | 0 | 0 | 0 | 2.26 KB |
#7365 | EnrichedLog |
net472 | 7.33μs | 8.14ns | 31.5ns | 0.327 | 0 | 0 | 2.08 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 |
net6.0 | 1.94μs | 9.33ns | 36.1ns | 0 | 0 | 0 | 1.2 KB |
master | SendReceive |
netcoreapp3.1 | 2.62μs | 1.13ns | 4.22ns | 0 | 0 | 0 | 1.2 KB |
master | SendReceive |
net472 | 3.11μs | 3.84ns | 14.9ns | 0.186 | 0 | 0 | 1.2 KB |
#7365 | SendReceive |
net6.0 | 1.97μs | 2.86ns | 10.3ns | 0 | 0 | 0 | 1.2 KB |
#7365 | SendReceive |
netcoreapp3.1 | 2.64μs | 13.5ns | 63.2ns | 0 | 0 | 0 | 1.2 KB |
#7365 | SendReceive |
net472 | 3.09μs | 1.48ns | 5.73ns | 0.186 | 0 | 0 | 1.2 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 |
net6.0 | 4.17μs | 6.27ns | 24.3ns | 0 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
netcoreapp3.1 | 5.74μs | 10.7ns | 40.1ns | 0 | 0 | 0 | 1.63 KB |
master | EnrichedLog |
net472 | 6.64μs | 8.61ns | 33.3ns | 0.299 | 0 | 0 | 2.03 KB |
#7365 | EnrichedLog |
net6.0 | 4.15μs | 1.02ns | 3.66ns | 0 | 0 | 0 | 1.58 KB |
#7365 | EnrichedLog |
netcoreapp3.1 | 5.49μs | 14.7ns | 57.1ns | 0 | 0 | 0 | 1.63 KB |
#7365 | EnrichedLog |
net472 | 6.33μs | 6.98ns | 26.1ns | 0.313 | 0 | 0 | 2.03 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 |
net6.0 | 748ns | 3.5ns | 13.1ns | 0 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 961ns | 5.06ns | 24.3ns | 0 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 897ns | 0.0789ns | 0.295ns | 0.0898 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 883ns | 0.372ns | 1.44ns | 0 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 1.1μs | 5.28ns | 26.9ns | 0 | 0 | 0 | 697 B |
master | StartFinishScope |
net472 | 1.09μs | 0.401ns | 1.55ns | 0.103 | 0 | 0 | 658 B |
#7365 | StartFinishSpan |
net6.0 | 733ns | 3.64ns | 15ns | 0 | 0 | 0 | 576 B |
#7365 | StartFinishSpan |
netcoreapp3.1 | 945ns | 4.45ns | 18.3ns | 0 | 0 | 0 | 576 B |
#7365 | StartFinishSpan |
net472 | 899ns | 0.116ns | 0.417ns | 0.0914 | 0 | 0 | 578 B |
#7365 | StartFinishScope |
net6.0 | 897ns | 2.92ns | 11.3ns | 0 | 0 | 0 | 696 B |
#7365 | StartFinishScope |
netcoreapp3.1 | 1.13μs | 4.32ns | 16.7ns | 0 | 0 | 0 | 696 B |
#7365 | StartFinishScope |
net472 | 1.08μs | 0.184ns | 0.711ns | 0.104 | 0 | 0 | 658 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 |
net6.0 | 1.03μs | 0.912ns | 3.53ns | 0 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 1.37μs | 3.62ns | 14ns | 0 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.35μs | 0.648ns | 2.51ns | 0.101 | 0 | 0 | 658 B |
#7365 | RunOnMethodBegin |
net6.0 | 1.03μs | 1.15ns | 4.47ns | 0 | 0 | 0 | 696 B |
#7365 | RunOnMethodBegin |
netcoreapp3.1 | 1.35μs | 6.45ns | 26.6ns | 0 | 0 | 0 | 696 B |
#7365 | RunOnMethodBegin |
net472 | 1.37μs | 0.783ns | 3.03ns | 0.103 | 0 | 0 | 658 B |
|
We are getting NRE's as returnValue is not null but the Instance may be.
It isn't nullable
Validate that we don't throw NullReferenceExceptions
6411fc1
to
538abd0
Compare
Summary of changes
Protect against
NullReferenceException
in the S3 integration by checkingreturnValue?.Instance is not null
instead ofreturnValue is not null
Reason for change
returnValue
won't be null, but theInstance
may be, so should check that.Implementation details
Added
?.Instance
to checks.Test coverage
I manually tested this by creating a S3 client pointing to a non-existent endpoint and saw the
NullReferenceException
. After making the changes and rebuilding the exception went away and instead a span was created.However I didn't commit this and only tested it for the
PutObjectAsyncIntegration
. Let me know if you think we should update tests to check for this.Other details
Fixes #7364