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

[APMSP-1317] Fetch agent info endpoint #619

Merged
merged 23 commits into from
Sep 25, 2024

Conversation

VianneyRuhlmann
Copy link
Contributor

@VianneyRuhlmann VianneyRuhlmann commented Sep 10, 2024

What does this PR do?

Add AgentInfoFetcher to fetch the agent info endpoint and keep it updated

Motivation

The info endpoint stores some essential parameters for client side stats

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/ddcommon/fetch-info-endpoint branch 2 times, most recently from cf14d38 to 480c41f Compare September 10, 2024 15:56
@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 89.58333% with 20 lines in your changes missing coverage. Please review.

Project coverage is 73.84%. Comparing base (829e93d) to head (1439225).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #619      +/-   ##
==========================================
+ Coverage   73.73%   73.84%   +0.10%     
==========================================
  Files         255      257       +2     
  Lines       37118    37309     +191     
==========================================
+ Hits        27369    27549     +180     
- Misses       9749     9760      +11     
Components Coverage Δ
crashtracker 20.53% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 93.06% <89.58%> (-0.27%) ⬇️
data-pipeline-ffi 0.00% <ø> (ø)
ddcommon 83.08% <ø> (ø)
ddcommon-ffi 69.52% <ø> (ø)
ddtelemetry 59.10% <ø> (ø)
dogstatsd-client 79.77% <ø> (ø)
ipc 83.58% <ø> (ø)
profiling 84.26% <ø> (-0.01%) ⬇️
profiling-ffi 77.42% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 38.19% <ø> (ø)
sidecar-ffi 0.00% <ø> (ø)
spawn-worker 50.36% <ø> (ø)
tinybytes 94.77% <ø> (ø)
trace-mini-agent 72.47% <ø> (ø)
trace-normalization 98.25% <ø> (ø)
trace-obfuscation 95.73% <ø> (ø)
trace-protobuf 77.67% <ø> (ø)
trace-utils 93.87% <ø> (+0.05%) ⬆️

@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/ddcommon/fetch-info-endpoint branch from 6f37661 to 543db99 Compare September 11, 2024 12:17
@pr-commenter
Copy link

pr-commenter bot commented Sep 11, 2024

Benchmarks

Comparison

Benchmark execution time: 2024-09-25 09:47:15

Comparing candidate commit 1439225 in PR branch vianney/ddcommon/fetch-info-endpoint with baseline commit 829e93d in branch main.

Found 6 performance improvements and 34 performance regressions! Performance is the same for 11 metrics, 2 unstable metrics.

scenario:benching string interning on wordpress profile

  • 🟥 execution_time [+3.012µs; +3.160µs] or [+2.171%; +2.278%]

scenario:credit_card/is_card_number/

  • 🟥 execution_time [+803.649ns; +804.129ns] or [+66.289%; +66.329%]
  • 🟥 throughput [-328973101.074op/s; -328785123.133op/s] or [-39.882%; -39.860%]

scenario:credit_card/is_card_number/ 3782-8224-6310-005

  • 🟥 execution_time [+5.746µs; +5.979µs] or [+5.381%; +5.599%]
  • 🟥 throughput [-496919.103op/s; -477801.165op/s] or [-5.306%; -5.102%]

scenario:credit_card/is_card_number/ 378282246310005

  • 🟥 execution_time [+4.626µs; +4.839µs] or [+4.639%; +4.852%]
  • 🟥 throughput [-464323.053op/s; -444165.317op/s] or [-4.630%; -4.429%]

scenario:credit_card/is_card_number/37828224631

  • 🟥 execution_time [+803.987ns; +804.379ns] or [+66.325%; +66.357%]
  • 🟥 throughput [-329082864.750op/s; -328935892.483op/s] or [-39.891%; -39.874%]

scenario:credit_card/is_card_number/378282246310005

  • 🟥 execution_time [+3.362µs; +3.580µs] or [+3.447%; +3.670%]
  • 🟥 throughput [-363456.828op/s; -341328.091op/s] or [-3.545%; -3.329%]

scenario:credit_card/is_card_number/37828224631000521389798

  • 🟥 execution_time [+6.293µs; +6.540µs] or [+6.652%; +6.912%]
  • 🟥 throughput [-684367.483op/s; -658530.053op/s] or [-6.475%; -6.230%]

scenario:credit_card/is_card_number/x371413321323331

  • 🟩 execution_time [-1.143µs; -1.087µs] or [-5.198%; -4.942%]
  • 🟩 throughput [+2366598.425op/s; +2481445.497op/s] or [+5.206%; +5.458%]

scenario:credit_card/is_card_number_no_luhn/

  • 🟥 execution_time [+803.891ns; +804.131ns] or [+66.318%; +66.338%]
  • 🟥 throughput [-329024371.282op/s; -328934955.044op/s] or [-39.883%; -39.872%]

scenario:credit_card/is_card_number_no_luhn/ 3782-8224-6310-005

  • 🟥 execution_time [+4.548µs; +4.810µs] or [+5.350%; +5.659%]
  • 🟥 throughput [-629662.985op/s; -596352.822op/s] or [-5.353%; -5.070%]

scenario:credit_card/is_card_number_no_luhn/ 378282246310005

  • 🟥 execution_time [+3.026µs; +3.194µs] or [+3.861%; +4.076%]
  • 🟥 throughput [-500448.693op/s; -474049.173op/s] or [-3.922%; -3.715%]

scenario:credit_card/is_card_number_no_luhn/37828224631

  • 🟥 execution_time [+804.046ns; +804.440ns] or [+66.333%; +66.366%]
  • 🟥 throughput [-329125778.454op/s; -328977635.058op/s] or [-39.894%; -39.877%]

scenario:credit_card/is_card_number_no_luhn/37828224631000521389798

  • 🟥 execution_time [+6.503µs; +6.726µs] or [+6.881%; +7.116%]
  • 🟥 throughput [-703560.873op/s; -680530.538op/s] or [-6.649%; -6.432%]

scenario:credit_card/is_card_number_no_luhn/x371413321323331

  • 🟩 execution_time [-1.213µs; -1.149µs] or [-5.496%; -5.207%]
  • 🟩 throughput [+2491914.408op/s; +2621580.915op/s] or [+5.500%; +5.786%]

scenario:normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...

  • 🟥 execution_time [+15.908µs; +15.981µs] or [+5.258%; +5.282%]
  • 🟥 throughput [-165860.120op/s; -165082.785op/s] or [-5.018%; -4.995%]

scenario:normalization/normalize_name/normalize_name/bad-name

  • 🟥 execution_time [+826.168ns; +838.402ns] or [+2.898%; +2.941%]
  • 🟥 throughput [-1002560.904op/s; -987749.001op/s] or [-2.858%; -2.816%]

scenario:normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters

  • 🟥 execution_time [+7.286µs; +7.360µs] or [+4.168%; +4.211%]
  • 🟥 throughput [-231205.035op/s; -228926.303op/s] or [-4.041%; -4.001%]

scenario:normalization/normalize_service/normalize_service/[empty string]

  • 🟩 execution_time [-1.409µs; -1.335µs] or [-3.042%; -2.882%]
  • 🟩 throughput [+641038.455op/s; +675795.886op/s] or [+2.970%; +3.131%]

scenario:normalization/normalize_service/normalize_service/test_ASCII

  • 🟥 execution_time [+9.853µs; +9.899µs] or [+24.224%; +24.338%]
  • 🟥 throughput [-4814923.037op/s; -4791875.728op/s] or [-19.584%; -19.490%]

scenario:normalization/normalize_trace/test_trace

  • 🟥 execution_time [+6.893ns; +12.052ns] or [+2.247%; +3.928%]

scenario:redis/obfuscate_redis_string

  • 🟥 execution_time [+0.831µs; +1.247µs] or [+2.190%; +3.288%]

scenario:sql/obfuscate_sql_string

  • 🟥 execution_time [+4.886µs; +4.955µs] or [+6.814%; +6.909%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 305.626ns 316.249ns ± 13.671ns 309.751ns ± 2.502ns 314.539ns 345.967ns 359.610ns 360.528ns 16.39% 1.707 1.858 4.31% 0.967ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [314.354ns; 318.144ns] or [-0.599%; +0.599%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 2.015µs 2.016µs ± 0.002µs 2.016µs ± 0.000µs 2.017µs 2.017µs 2.018µs 2.031µs 0.75% 7.682 68.784 0.08% 0.000µs 1 200
credit_card/is_card_number/ throughput 492320690.551op/s 495977583.752op/s ± 371477.856op/s 495994668.058op/s ± 118318.216op/s 496140482.178op/s 496221495.908op/s 496264577.013op/s 496312130.699op/s 0.06% -7.656 68.447 0.07% 26267.451op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 111.556µs 112.640µs ± 0.641µs 112.551µs ± 0.372µs 112.951µs 113.857µs 114.474µs 115.360µs 2.50% 1.007 1.204 0.57% 0.045µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 8668489.777op/s 8878089.979op/s ± 50206.052op/s 8884878.387op/s ± 29481.756op/s 8913208.530op/s 8940082.684op/s 8947513.989op/s 8964105.907op/s 0.89% -0.970 1.074 0.56% 3550.104op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 103.218µs 104.449µs ± 0.612µs 104.390µs ± 0.441µs 104.885µs 105.462µs 105.957µs 106.763µs 2.27% 0.698 0.612 0.58% 0.043µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 9366512.513op/s 9574377.244op/s ± 55840.811op/s 9579453.988op/s ± 40439.907op/s 9619100.900op/s 9649864.001op/s 9665417.821op/s 9688264.938op/s 1.14% -0.661 0.505 0.58% 3948.542op/s 1 200
credit_card/is_card_number/37828224631 execution_time 2.015µs 2.016µs ± 0.001µs 2.016µs ± 0.001µs 2.017µs 2.017µs 2.019µs 2.031µs 0.74% 8.301 95.580 0.06% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 492303880.923op/s 495938038.788op/s ± 308319.295op/s 495931511.865op/s ± 133425.634op/s 496113312.292op/s 496194220.347op/s 496232530.099op/s 496246485.629op/s 0.06% -8.248 94.740 0.06% 21801.466op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 100.049µs 101.009µs ± 0.534µs 100.945µs ± 0.320µs 101.265µs 101.972µs 102.759µs 103.362µs 2.39% 1.059 1.937 0.53% 0.038µs 1 200
credit_card/is_card_number/378282246310005 throughput 9674738.232op/s 9900374.932op/s ± 52095.636op/s 9906416.388op/s ± 31506.727op/s 9937908.650op/s 9968977.599op/s 9980726.231op/s 9995062.036op/s 0.89% -1.015 1.771 0.52% 3683.718op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 100.510µs 101.032µs ± 0.593µs 100.889µs ± 0.274µs 101.213µs 101.913µs 103.995µs 104.378µs 3.46% 3.112 13.193 0.59% 0.042µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 9580559.282op/s 9898182.874op/s ± 57068.681op/s 9911839.666op/s ± 26912.992op/s 9933971.130op/s 9947877.054op/s 9949068.886op/s 9949298.375op/s 0.38% -3.017 12.506 0.58% 4035.365op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 20.868µs 20.883µs ± 0.016µs 20.880µs ± 0.006µs 20.886µs 20.916µs 20.938µs 20.984µs 0.50% 2.929 11.767 0.08% 0.001µs 1 200
credit_card/is_card_number/x371413321323331 throughput 47655611.955op/s 47885230.151op/s ± 37212.846op/s 47893124.100op/s ± 14558.506op/s 47908943.065op/s 47916166.594op/s 47917914.839op/s 47919433.057op/s 0.05% -2.917 11.668 0.08% 2631.346op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 2.015µs 2.016µs ± 0.001µs 2.016µs ± 0.001µs 2.017µs 2.017µs 2.018µs 2.019µs 0.16% 0.843 0.697 0.04% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 495222896.231op/s 495987381.776op/s ± 190857.894op/s 496015128.467op/s ± 140773.905op/s 496147678.362op/s 496228912.879op/s 496250106.088op/s 496267935.058op/s 0.05% -0.841 0.689 0.04% 13495.691op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 87.447µs 89.690µs ± 0.844µs 89.569µs ± 0.403µs 90.106µs 91.136µs 92.365µs 92.741µs 3.54% 0.589 1.365 0.94% 0.060µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 10782678.013op/s 11150532.907op/s ± 104405.432op/s 11164627.129op/s ± 50461.652op/s 11204632.012op/s 11306293.579op/s 11409769.745op/s 11435510.917op/s 2.43% -0.504 1.249 0.93% 7382.579op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 80.971µs 81.480µs ± 0.385µs 81.359µs ± 0.054µs 81.500µs 82.169µs 83.051µs 83.266µs 2.34% 2.373 6.468 0.47% 0.027µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 12009758.954op/s 12273256.268op/s ± 57366.658op/s 12291257.230op/s ± 8127.334op/s 12298152.203op/s 12335831.706op/s 12346675.322op/s 12350172.576op/s 0.48% -2.333 6.257 0.47% 4056.435op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 2.015µs 2.016µs ± 0.001µs 2.016µs ± 0.001µs 2.017µs 2.017µs 2.019µs 2.031µs 0.74% 8.494 97.489 0.06% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 492263474.100op/s 495938959.290op/s ± 310406.435op/s 495927867.293op/s ± 125178.465op/s 496101738.064op/s 496183133.754op/s 496207528.387op/s 496243854.230op/s 0.06% -8.443 96.665 0.06% 21949.049op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 77.307µs 77.808µs ± 0.244µs 77.773µs ± 0.061µs 77.853µs 78.189µs 78.576µs 79.777µs 2.58% 3.081 21.101 0.31% 0.017µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 12534909.480op/s 12852309.270op/s ± 39940.696op/s 12857977.558op/s ± 10096.108op/s 12867755.015op/s 12913260.960op/s 12921456.063op/s 12935500.187op/s 0.60% -2.956 19.880 0.31% 2824.234op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 100.511µs 101.129µs ± 0.598µs 100.977µs ± 0.276µs 101.315µs 102.257µs 103.774µs 104.228µs 3.22% 2.365 7.542 0.59% 0.042µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 9594333.356op/s 9888659.940op/s ± 57637.473op/s 9903289.948op/s ± 27083.637op/s 9926444.057op/s 9946372.146op/s 9948835.784op/s 9949160.783op/s 0.46% -2.296 7.117 0.58% 4075.585op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 20.867µs 20.892µs ± 0.030µs 20.883µs ± 0.010µs 20.893µs 20.955µs 21.006µs 21.080µs 0.95% 2.863 10.799 0.14% 0.002µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 47437280.010op/s 47866272.631op/s ± 67408.040op/s 47886329.827op/s ± 21980.239op/s 47907465.533op/s 47914861.281op/s 47921405.780op/s 47922236.587op/s 0.07% -2.844 10.632 0.14% 4766.468op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [2.016µs; 2.016µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ throughput [495926100.493op/s; 496029067.010op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [112.552µs; 112.729µs] or [-0.079%; +0.079%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [8871131.903op/s; 8885048.055op/s] or [-0.078%; +0.078%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [104.364µs; 104.534µs] or [-0.081%; +0.081%] None None None
credit_card/is_card_number/ 378282246310005 throughput [9566638.245op/s; 9582116.243op/s] or [-0.081%; +0.081%] None None None
credit_card/is_card_number/37828224631 execution_time [2.016µs; 2.017µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631 throughput [495895308.699op/s; 495980768.877op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/378282246310005 execution_time [100.935µs; 101.083µs] or [-0.073%; +0.073%] None None None
credit_card/is_card_number/378282246310005 throughput [9893154.978op/s; 9907594.886op/s] or [-0.073%; +0.073%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [100.950µs; 101.114µs] or [-0.081%; +0.081%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [9890273.703op/s; 9906092.044op/s] or [-0.080%; +0.080%] None None None
credit_card/is_card_number/x371413321323331 execution_time [20.881µs; 20.886µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/x371413321323331 throughput [47880072.808op/s; 47890387.494op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ execution_time [2.016µs; 2.016µs] or [-0.005%; +0.005%] None None None
credit_card/is_card_number_no_luhn/ throughput [495960930.707op/s; 496013832.845op/s] or [-0.005%; +0.005%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [89.573µs; 89.807µs] or [-0.130%; +0.130%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [11136063.318op/s; 11165002.496op/s] or [-0.130%; +0.130%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [81.426µs; 81.533µs] or [-0.065%; +0.065%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [12265305.801op/s; 12281206.735op/s] or [-0.065%; +0.065%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [2.016µs; 2.017µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [495895939.944op/s; 495981978.637op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [77.774µs; 77.842µs] or [-0.043%; +0.043%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [12846773.874op/s; 12857844.667op/s] or [-0.043%; +0.043%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [101.047µs; 101.212µs] or [-0.082%; +0.082%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [9880671.941op/s; 9896647.940op/s] or [-0.081%; +0.081%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [20.887µs; 20.896µs] or [-0.020%; +0.020%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [47856930.525op/s; 47875614.737op/s] or [-0.020%; +0.020%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 76.335µs 76.633µs ± 0.118µs 76.631µs ± 0.029µs 76.655µs 76.713µs 76.891µs 78.013µs 1.80% 8.089 92.163 0.15% 0.008µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [76.617µs; 76.649µs] or [-0.021%; +0.021%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 1.144µs 1.206µs ± 0.023µs 1.211µs ± 0.013µs 1.225µs 1.227µs 1.230µs 1.230µs 1.57% -1.310 0.868 1.91% 0.002µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [1.203µs; 1.209µs] or [-0.266%; +0.266%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 140.972µs 141.817µs ± 0.411µs 141.794µs ± 0.185µs 141.983µs 142.406µs 143.099µs 144.720µs 2.06% 2.392 14.067 0.29% 0.029µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [141.760µs; 141.874µs] or [-0.040%; +0.040%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.402µs 3.215µs ± 1.552µs 3.066µs ± 0.029µs 3.093µs 3.133µs 13.809µs 17.916µs 484.30% 7.962 64.341 48.15% 0.110µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [3.000µs; 3.430µs] or [-6.690%; +6.690%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 18.318µs 27.573µs ± 11.061µs 21.714µs ± 0.082µs 35.315µs 45.011µs 51.792µs 102.105µs 370.22% 2.850 12.907 40.02% 0.782µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [26.040µs; 29.106µs] or [-5.560%; +5.560%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 9.046ms 9.086ms ± 0.021ms 9.086ms ± 0.009ms 9.095ms 9.110ms 9.127ms 9.290ms 2.25% 4.369 40.007 0.23% 0.002ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [9.083ms; 9.089ms] or [-0.033%; +0.033%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.688µs 2.720µs ± 0.015µs 2.721µs ± 0.009µs 2.729µs 2.744µs 2.763µs 2.764µs 1.58% 0.178 0.439 0.56% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.718µs; 2.723µs] or [-0.077%; +0.077%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 500.252µs 502.628µs ± 0.329µs 502.621µs ± 0.126µs 502.789µs 503.111µs 503.221µs 503.295µs 0.13% -3.571 23.373 0.07% 0.023µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1986908.042op/s 1989542.903op/s ± 1303.769op/s 1989570.671op/s ± 500.203op/s 1989947.889op/s 1990688.774op/s 1993736.697op/s 1998990.954op/s 0.47% 3.596 23.582 0.07% 92.190op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 464.924µs 465.480µs ± 0.269µs 465.480µs ± 0.192µs 465.662µs 465.902µs 466.152µs 466.228µs 0.16% 0.156 -0.313 0.06% 0.019µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2144873.082op/s 2148320.497op/s ± 1240.791op/s 2148320.621op/s ± 885.412op/s 2149221.707op/s 2150273.906op/s 2150747.122op/s 2150890.395op/s 0.12% -0.153 -0.316 0.06% 87.737op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 181.420µs 182.104µs ± 0.246µs 182.111µs ± 0.178µs 182.290µs 182.463µs 182.631µs 182.742µs 0.35% -0.250 -0.275 0.13% 0.017µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5472203.077op/s 5491382.561op/s ± 7421.020op/s 5491151.345op/s ± 5352.772op/s 5496364.993op/s 5504243.735op/s 5508498.347op/s 5512065.508op/s 0.38% 0.257 -0.271 0.13% 524.745op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 44.557µs 44.958µs ± 0.122µs 44.974µs ± 0.068µs 45.039µs 45.136µs 45.183µs 45.245µs 0.60% -0.669 0.691 0.27% 0.009µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 22101930.419op/s 22243232.879op/s ± 60479.974op/s 22234928.386op/s ± 33672.192op/s 22273259.095op/s 22355106.346op/s 22413871.330op/s 22443348.080op/s 0.94% 0.687 0.720 0.27% 4276.580op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 50.288µs 50.551µs ± 0.122µs 50.551µs ± 0.078µs 50.623µs 50.736µs 50.856µs 51.139µs 1.16% 0.723 2.059 0.24% 0.009µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 19554628.385op/s 19782311.321op/s ± 47761.604op/s 19781972.422op/s ± 30402.100op/s 19813800.399op/s 19855082.245op/s 19869643.610op/s 19885301.580op/s 0.52% -0.698 1.957 0.24% 3377.255op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [502.583µs; 502.674µs] or [-0.009%; +0.009%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1989362.213op/s; 1989723.593op/s] or [-0.009%; +0.009%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [465.443µs; 465.517µs] or [-0.008%; +0.008%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2148148.536op/s; 2148492.459op/s] or [-0.008%; +0.008%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [182.070µs; 182.138µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5490354.079op/s; 5492411.043op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [44.941µs; 44.975µs] or [-0.038%; +0.038%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [22234850.936op/s; 22251614.822op/s] or [-0.038%; +0.038%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [50.534µs; 50.567µs] or [-0.034%; +0.034%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [19775692.022op/s; 19788930.620op/s] or [-0.033%; +0.033%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 38.435µs 38.973µs ± 0.922µs 38.546µs ± 0.057µs 38.665µs 40.952µs 40.976µs 41.854µs 8.58% 1.712 1.030 2.36% 0.065µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [38.845µs; 39.101µs] or [-0.328%; +0.328%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1439225 1727256975 vianney/ddcommon/fetch-info-endpoint
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 318.206µs 318.494µs ± 0.148µs 318.478µs ± 0.081µs 318.592µs 318.745µs 318.867µs 318.920µs 0.14% 0.388 -0.018 0.05% 0.010µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 3135583.348op/s 3139779.428op/s ± 1456.005op/s 3139930.900op/s ± 799.744op/s 3140662.639op/s 3142094.201op/s 3142538.211op/s 3142622.862op/s 0.09% -0.386 -0.020 0.05% 102.955op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 29.292µs 29.339µs ± 0.025µs 29.343µs ± 0.010µs 29.353µs 29.372µs 29.400µs 29.410µs 0.23% -0.160 0.080 0.08% 0.002µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 34001972.775op/s 34084206.277op/s ± 28505.275op/s 34079960.189op/s ± 12078.115op/s 34093054.015op/s 34134107.906op/s 34135934.781op/s 34139285.634op/s 0.17% 0.165 0.074 0.08% 2015.627op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 17.285µs 17.314µs ± 0.041µs 17.294µs ± 0.007µs 17.333µs 17.347µs 17.383µs 17.771µs 2.76% 7.296 78.440 0.23% 0.003µs 1 200
normalization/normalize_name/normalize_name/good throughput 56270115.960op/s 57757723.994op/s ± 133380.495op/s 57823868.497op/s ± 22001.183op/s 57833850.577op/s 57844604.808op/s 57850055.837op/s 57853630.315op/s 0.05% -7.107 75.547 0.23% 9431.425op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [318.473µs; 318.514µs] or [-0.006%; +0.006%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [3139577.639op/s; 3139981.216op/s] or [-0.006%; +0.006%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [29.336µs; 29.343µs] or [-0.012%; +0.012%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [34080255.720op/s; 34088156.834op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_name/normalize_name/good execution_time [17.308µs; 17.319µs] or [-0.033%; +0.033%] None None None
normalization/normalize_name/normalize_name/good throughput [57739238.740op/s; 57776209.248op/s] or [-0.032%; +0.032%] None None None

Baseline

Omitted due to size.

@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/ddcommon/fetch-info-endpoint branch 2 times, most recently from 868ebe6 to 506770d Compare September 11, 2024 13:55
@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/ddcommon/fetch-info-endpoint branch from 506770d to d1e4c37 Compare September 11, 2024 14:00
@VianneyRuhlmann VianneyRuhlmann marked this pull request as ready for review September 11, 2024 14:03
/// given refresh interval.
///
/// # Example
/// ```no_run
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm slightly uneasy about no_run examples since it is easy for the example to drift from the implementation since the compiler isn't checking it. I'd much prefer a well documented test or example module to showcase usability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the no_run doc tests are still compiled just not run (which is not possible since it does http calls). But I can add some test with the test agent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added some integration tests with the test agent. We need to wait for DataDog/dd-apm-test-agent#193 to get merged since the test agent does not send the agent state header. I also added a require_test_agent module to the trace-utils integration test to filter out all tests that use it in the pipeline.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, TIL. I incorrectly assumed no_run was completely ignored by the compiler. In that case, I have no objection to using it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also added a require_test_agent module to the trace-utils integration test to filter out all tests that use it in the pipeline.

I'm not sure that's necessary. We already run integration tests separately on CI. I think the correct separation for tests is the type (unit, integration, fuzz, etc). Also, by definition I believe all trace-utils integrations should be hitting the test agent anyway.

Copy link
Contributor

@ekump ekump Sep 17, 2024

Choose a reason for hiding this comment

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

Yes. We currently do that with the -E '!test(tracing_integration_tests::)' flag.

But that filter won't apply to your test. What about changing it to something more generic like just integration_tests instead of require_test_agent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we assume all integration tests will require the test agent ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can assume all integration tests may (but not necessarily) require external entities like containers running the test-agent or other services. I think we also want to assume integration tests should run separately from unit tests and other workflows in CI. These assumptions are why I think a less specific filter of just integration_tests is preferable to filtering on whether or not they use the test-agent.

For data-pipeline or trace-utils specifically - yes I think we would assume the test-agent is being used. But I wouldn't necessarily say the same for other crates in libdatadog that may wish to write integration tests.

Copy link
Contributor Author

@VianneyRuhlmann VianneyRuhlmann Sep 20, 2024

Choose a reason for hiding this comment

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

I'm okay with running the integrations tests in a separated ci step. But we still need to be able to run the tests using the test agent separately as they only run on Linux (at least we only run them on linux in the CI) whereas the other integration tests run on all platform.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you are worried about operating systems wouldn't it be better to just ignore tests on OSes we don't want to use with #[cfg(not(target_os = "x"))]?

Copy link

@knusbaum knusbaum left a comment

Choose a reason for hiding this comment

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

Looks mostly good. Just need to update the info struct to reflect the changes we're making regarding some of the fields, namely span_kinds_stats_computed

/// Schema of an agent info response
#[allow(missing_docs)]
#[derive(Clone, Deserialize, Default, Debug, PartialEq)]
pub struct AgentInfoStruct {

Choose a reason for hiding this comment

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

This should be updated with the latest changes to the RFC and here:
DataDog/datadog-agent#28861

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

agent-info/Cargo.toml Outdated Show resolved Hide resolved
@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/ddcommon/fetch-info-endpoint branch from 3ec4a0b to 9b1a402 Compare September 17, 2024 13:42
@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/ddcommon/fetch-info-endpoint branch from b45818a to 39c22b5 Compare September 18, 2024 13:59
@ekump
Copy link
Contributor

ekump commented Sep 19, 2024

FYI, this branch needs a Jira ticket associated with it.

// SPDX-License-Identifier: Apache-2.0

#[cfg(test)]
mod require_test_agent {
Copy link
Contributor

Choose a reason for hiding this comment

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

These tests don't seem to pass yet. Are you still waiting on changes from the test-agent to be deployed?

let current_info = self.info.load();
let current_hash = current_info.as_ref().map(|info| info.state_hash.as_str());
let res = fetch_info_with_state(&self.info_endpoint, current_hash).await;
if let Ok(FetchInfoStatus::NewState(new_info)) = res {
Copy link
Contributor

Choose a reason for hiding this comment

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

what about the not OK state? At a minimum, we should probably log something, no?

if let Ok(FetchInfoStatus::NewState(new_info)) = res {
self.info.store(Some(Arc::new(*new_info)));
}
sleep(self.refresh_interval).await; // Wait 5 min between each call to /info
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment should probably remove the 5 min part?

@VianneyRuhlmann VianneyRuhlmann changed the title Fetch agent info endpoint [APMSP-1317] Fetch agent info endpoint Sep 20, 2024
@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/ddcommon/fetch-info-endpoint branch from ef9bc24 to dc65743 Compare September 23, 2024 11:59
@VianneyRuhlmann
Copy link
Contributor Author

Requires https://github.com/DataDog/libddprof-build/pull/52 to be merged

Copy link

@knusbaum knusbaum left a comment

Choose a reason for hiding this comment

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

LGTM

@VianneyRuhlmann VianneyRuhlmann merged commit bc58fa5 into main Sep 25, 2024
30 checks passed
@VianneyRuhlmann VianneyRuhlmann deleted the vianney/ddcommon/fetch-info-endpoint branch September 25, 2024 13:24
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.

4 participants