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

[CIVisibility] - Add support for GZip compression in Multipart payloads #5060

Merged

Conversation

tonyredondo
Copy link
Member

@tonyredondo tonyredondo commented Jan 15, 2024

Summary of changes

This PR enables Gzip compression on the Code Coverage track using Multipart-Form

Backend compression support:
image

Reason for change

Currently we are sending all the code coverage data uncompressed to the backend, because these payload could potentially be huge we are enabling gzip support on upload only when we are in agentless mode.

Implementation details

Changes a little bit the internal api to select wether we want compression or not, and implement the compression algorithm in both HttpClient and ApiClient factories.

Test coverage

Tested manually, and added a new test for the Gzipped multipart form post in the HttpClientRequest object, other tests will be done in the test-environment repo.

@tonyredondo tonyredondo marked this pull request as ready for review January 15, 2024 10:10
@tonyredondo tonyredondo requested review from a team as code owners January 15, 2024 10:10
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I'm sad there's no tests 🙁😉

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jan 15, 2024

Datadog Report

Branch report: tony/civisibility-enable-gzip-on-codecoverage-requests
Commit report: 255e4c7
Test service: dd-trace-dotnet

✅ 0 Failed, 306284 Passed, 1000 Skipped, 31m 41.86s Wall Time

@andrewlock
Copy link
Member

andrewlock commented Jan 15, 2024

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:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5060) - mean (70ms)  : 57, 83
     .   : milestone, 70,
    master - mean (72ms)  : 62, 82
     .   : milestone, 72,

    section CallTarget+Inlining+NGEN
    This PR (5060) - mean (1,013ms)  : 985, 1042
     .   : milestone, 1013,
    master - mean (1,021ms)  : 995, 1047
     .   : milestone, 1021,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5060) - mean (105ms)  : 101, 109
     .   : milestone, 105,
    master - mean (106ms)  : 102, 110
     .   : milestone, 106,

    section CallTarget+Inlining+NGEN
    This PR (5060) - mean (726ms)  : 703, 748
     .   : milestone, 726,
    master - mean (727ms)  : 705, 750
     .   : milestone, 727,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5060) - mean (89ms)  : 84, 93
     .   : milestone, 89,
    master - mean (90ms)  : 86, 93
     .   : milestone, 90,

    section CallTarget+Inlining+NGEN
    This PR (5060) - mean (682ms)  : 660, 705
     .   : milestone, 682,
    master - mean (691ms)  : 666, 717
     .   : milestone, 691,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5060) - mean (189ms)  : 185, 192
     .   : milestone, 189,
    master - mean (188ms)  : 185, 190
     .   : milestone, 188,

    section CallTarget+Inlining+NGEN
    This PR (5060) - mean (1,132ms)  : 1109, 1154
     .   : milestone, 1132,
    master - mean (1,127ms)  : 1103, 1151
     .   : milestone, 1127,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5060) - mean (272ms)  : 267, 276
     .   : milestone, 272,
    master - mean (271ms)  : 267, 276
     .   : milestone, 271,

    section CallTarget+Inlining+NGEN
    This PR (5060) - mean (1,085ms)  : 1064, 1105
     .   : milestone, 1085,
    master - mean (1,083ms)  : 1063, 1104
     .   : milestone, 1083,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5060) - mean (261ms)  : 258, 264
     .   : milestone, 261,
    master - mean (261ms)  : 258, 264
     .   : milestone, 261,

    section CallTarget+Inlining+NGEN
    This PR (5060) - mean (1,056ms)  : 1031, 1080
     .   : milestone, 1056,
    master - mean (1,052ms)  : 1023, 1082
     .   : milestone, 1052,

Loading

@tonyredondo tonyredondo merged commit 836ed26 into master Jan 15, 2024
52 of 55 checks passed
@tonyredondo tonyredondo deleted the tony/civisibility-enable-gzip-on-codecoverage-requests branch January 15, 2024 15:17
@github-actions github-actions bot added this to the vNext milestone Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants