dd-trace-py
dd-trace-py copied to clipboard
chore(perf): add set_http_meta with obfuscation data benchmark scenario
Description
Add tests regarding data obfuscation to ddtrace.contrib.trace_utils.set_http_meta
Results between 1.4.0rc1 and https://github.com/DataDog/dd-trace-py/pull/3980
+ pyperf compare_to --table /artifacts/b01e03bf-cc04-485f-a87a-223d3b94bcd5/set_http_meta_querystring_obfuscation/1.4.0rc1//results.json /artifacts/b01e03bf-cc04-485f-a87a-223d3b94bcd5/set_http_meta_querystring_obfuscation/1.3.0rc2.dev101+g1ac51d80//results.json
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Benchmark | /artifacts/b01e03bf-cc04-485f-a87a-223d3b94bcd5/set_http_meta_querystring_obfuscation/1.4.0rc1//results.json | /artifacts/b01e03bf-cc04-485f-a87a-223d3b94bcd5/set_http_meta_querystring_obfuscation/1.3.0rc2.dev101+g1ac51d80//results.json |
+=========================================+==============================================================================================================+===============================================================================================================================+
| sethttpmeta-worst-case-implicit-query | 13.0 us | 49.7 us: 3.82x slower |
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| sethttpmeta-worst-case-explicit-query | 13.0 us | 47.1 us: 3.62x slower |
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| sethttpmeta-regular-case-implicit-query | 13.1 us | 22.9 us: 1.75x slower |
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| sethttpmeta-regular-case-explicit-query | 13.0 us | 22.6 us: 1.75x slower |
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| sethttpmeta-no-query | 12.9 us | 14.6 us: 1.13x slower |
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| sethttpmeta-send-querystring-disabled | 13.2 us | 13.1 us: 1.01x faster |
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Geometric mean | (ref) | 1.73x slower |
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
Benchmark hidden because not significant (1): sethttpmeta-obfuscation-disabled
Checklist
- [ ] Title must conform to conventional commit.
- [ ] Add additional sections for
featandfixpull requests. - [ ] Ensure tests are passing for affected code.
- [ ] Library documentation and/or Datadog's documentation site is updated. Link to doc PR in description.
Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking API changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else
changelog/no-changeloglabel added. - [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.
Codecov Report
Merging #4057 (50e775b) into 1.x (a940ef1) will increase coverage by
0.00%. The diff coverage is100.00%.
@@ Coverage Diff @@
## 1.x #4057 +/- ##
=======================================
Coverage 78.86% 78.86%
=======================================
Files 720 720
Lines 57386 57387 +1
=======================================
+ Hits 45255 45256 +1
Misses 12131 12131
| Impacted Files | Coverage Δ | |
|---|---|---|
| tests/contrib/httplib/test_httplib.py | 97.86% <100.00%> (+<0.01%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@gnufede Can you fold these variants into the new set_http_meta scenario?
@gnufede Can you fold these variants into the new
set_http_metascenario?
I can, but then we'll have to be very careful about all the parameters of the config to ensure we're measuring the feature we want to measure (user agent configuration would impact obfuscation results and viceversa)