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-1013] Add stats exporter #584

Conversation

VianneyRuhlmann
Copy link
Contributor

@VianneyRuhlmann VianneyRuhlmann commented Aug 9, 2024

What does this PR do?

This PR add stats computation in the data pipeline crate by:

  • Using a SpanConcentrator to compute stats on received spans in the trace exporter
  • Introducing a StatsExporter to send stats on a every time a stats bucket expires
  • Dropping spans that are not going to be sampled by the trace agent
  • Add support for client-side stats http header
  • Update ffi bindings to allow stats computation

Motivation

The support for client side stats will allow using client side stats by default. This will reduce the number of span received by the agent.

Additional Notes

This PR does not allow fetching the list of peer tags from the /info endpoint of the agent.

How to test the change?

Describe here in detail how the change can be validated.

@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload branch 2 times, most recently from 53043a5 to 77af1cb Compare August 9, 2024 13:19
@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 90.59561% with 60 lines in your changes missing coverage. Please review.

Project coverage is 73.58%. Comparing base (4c7552b) to head (3475380).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #584      +/-   ##
==========================================
+ Coverage   73.19%   73.58%   +0.39%     
==========================================
  Files         254      255       +1     
  Lines       36312    36941     +629     
==========================================
+ Hits        26578    27183     +605     
- Misses       9734     9758      +24     
Components Coverage Δ
crashtracker 20.53% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 91.65% <90.30%> (+1.48%) ⬆️
data-pipeline-ffi 0.00% <0.00%> (ø)
ddcommon 83.08% <ø> (ø)
ddcommon-ffi 69.52% <ø> (ø)
ddtelemetry 59.10% <ø> (ø)
ipc 83.58% <ø> (ø)
profiling 84.26% <ø> (ø)
profiling-ffi 77.42% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 40.10% <ø> (ø)
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.41% <100.00%> (-0.13%) ⬇️

@pr-commenter
Copy link

pr-commenter bot commented Aug 9, 2024

Benchmarks

Comparison

Benchmark execution time: 2024-09-20 08:13:26

Comparing candidate commit 3475380 in PR branch vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload with baseline commit 4c7552b in branch main.

Found 1 performance improvements and 2 performance regressions! Performance is the same for 48 metrics, 2 unstable metrics.

scenario:benching deserializing traces from msgpack to their internal representation

  • 🟩 execution_time [-53.528ns; -44.490ns] or [-4.297%; -3.571%]

scenario:normalization/normalize_name/normalize_name/good

  • 🟥 execution_time [+394.903ns; +418.112ns] or [+2.447%; +2.591%]
  • 🟥 throughput [-1567057.934op/s; -1479256.143op/s] or [-2.529%; -2.387%]

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 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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.415µs 2.416µs ± 0.001µs 2.416µs ± 0.001µs 2.417µs 2.418µs 2.419µs 2.420µs 0.15% 0.949 0.712 0.04% 0.000µs 1 200
credit_card/is_card_number/ throughput 413226110.858op/s 413825096.256op/s ± 160692.978op/s 413865794.021op/s ± 111920.874op/s 413956287.707op/s 414011205.480op/s 414036841.247op/s 414083231.830op/s 0.05% -0.947 0.705 0.04% 11362.709op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 111.526µs 115.434µs ± 1.302µs 115.610µs ± 0.887µs 116.421µs 117.281µs 117.476µs 118.980µs 2.91% -0.468 -0.012 1.13% 0.092µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 8404802.330op/s 8664062.053op/s ± 98278.412op/s 8649795.806op/s ± 66334.279op/s 8726519.700op/s 8821113.363op/s 8925734.573op/s 8966507.004op/s 3.66% 0.528 0.068 1.13% 6949.333op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 104.479µs 107.225µs ± 1.357µs 107.177µs ± 0.937µs 108.113µs 109.517µs 110.258µs 110.365µs 2.97% 0.147 -0.557 1.26% 0.096µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 9060860.337op/s 9327688.817op/s ± 117847.134op/s 9330334.375op/s ± 81418.314op/s 9413327.187op/s 9521538.230op/s 9558492.687op/s 9571316.186op/s 2.58% -0.093 -0.576 1.26% 8333.051op/s 1 200
credit_card/is_card_number/37828224631 execution_time 2.415µs 2.417µs ± 0.002µs 2.416µs ± 0.001µs 2.417µs 2.418µs 2.424µs 2.433µs 0.69% 6.251 55.907 0.07% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 410996637.553op/s 413799955.140op/s ± 275791.244op/s 413825511.409op/s ± 120622.888op/s 413954724.815op/s 414016382.078op/s 414040319.921op/s 414044501.531op/s 0.05% -6.214 55.371 0.07% 19501.386op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 100.775µs 105.851µs ± 1.603µs 106.205µs ± 0.917µs 107.054µs 107.720µs 108.045µs 108.239µs 1.92% -0.968 0.336 1.51% 0.113µs 1 200
credit_card/is_card_number/378282246310005 throughput 9238786.253op/s 9449451.459op/s ± 145298.242op/s 9415782.927op/s ± 80616.298op/s 9522983.721op/s 9772232.715op/s 9832194.366op/s 9923079.422op/s 5.39% 1.033 0.494 1.53% 10274.137op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 104.670µs 106.570µs ± 0.382µs 106.600µs ± 0.217µs 106.819µs 107.080µs 107.281µs 107.464µs 0.81% -1.013 2.764 0.36% 0.027µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 9305475.906op/s 9383617.797op/s ± 33766.564op/s 9380848.997op/s ± 19116.604op/s 9398502.203op/s 9448621.235op/s 9470090.588op/s 9553800.909op/s 1.84% 1.054 2.936 0.36% 2387.657op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 21.801µs 22.429µs ± 0.365µs 22.390µs ± 0.268µs 22.660µs 23.108µs 23.256µs 23.429µs 4.64% 0.424 -0.510 1.62% 0.026µs 1 200
credit_card/is_card_number/x371413321323331 throughput 42681386.657op/s 44596571.254op/s ± 721208.985op/s 44663634.261op/s ± 537975.472op/s 45201589.953op/s 45678497.770op/s 45816047.583op/s 45868722.254op/s 2.70% -0.361 -0.587 1.61% 50997.176op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 2.415µs 2.416µs ± 0.001µs 2.416µs ± 0.001µs 2.417µs 2.418µs 2.419µs 2.420µs 0.14% 0.995 0.679 0.04% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 413295596.520op/s 413832669.158op/s ± 154553.581op/s 413864014.542op/s ± 102240.757op/s 413959899.998op/s 414005335.377op/s 414065642.821op/s 414075858.017op/s 0.05% -0.993 0.673 0.04% 10928.589op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 86.952µs 87.318µs ± 0.284µs 87.277µs ± 0.083µs 87.350µs 87.711µs 88.910µs 89.125µs 2.12% 3.917 19.280 0.32% 0.020µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 11220231.385op/s 11452538.082op/s ± 36795.634op/s 11457802.062op/s ± 10891.792op/s 11470051.696op/s 11485491.419op/s 11498619.661op/s 11500660.138op/s 0.37% -3.860 18.825 0.32% 2601.844op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 79.655µs 80.269µs ± 0.600µs 80.092µs ± 0.271µs 80.444µs 81.417µs 82.447µs 83.105µs 3.76% 2.141 5.539 0.75% 0.042µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 12032978.447op/s 12458819.826op/s ± 91687.980op/s 12485622.805op/s ± 42273.877op/s 12522188.074op/s 12544908.389op/s 12553816.668op/s 12554209.075op/s 0.55% -2.077 5.199 0.73% 6483.319op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 2.415µs 2.417µs ± 0.001µs 2.416µs ± 0.001µs 2.417µs 2.419µs 2.422µs 2.426µs 0.39% 2.876 11.688 0.06% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 412251694.052op/s 413794652.150op/s ± 243004.992op/s 413855551.914op/s ± 106183.619op/s 413940203.944op/s 414021560.870op/s 414058519.822op/s 414104360.502op/s 0.06% -2.867 11.613 0.06% 17183.048op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 76.684µs 77.050µs ± 0.411µs 76.942µs ± 0.120µs 77.098µs 77.667µs 78.979µs 79.089µs 2.79% 3.435 12.516 0.53% 0.029µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 12644011.645op/s 12979008.915op/s ± 68078.212op/s 12996871.003op/s ± 20324.811op/s 13013387.848op/s 13026762.704op/s 13032291.438op/s 13040507.729op/s 0.34% -3.391 12.243 0.52% 4813.857op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 105.420µs 106.609µs ± 0.436µs 106.647µs ± 0.302µs 106.924µs 107.235µs 107.568µs 107.759µs 1.04% -0.232 0.005 0.41% 0.031µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 9279969.167op/s 9380197.287op/s ± 38419.604op/s 9376760.226op/s ± 26564.169op/s 9406400.883op/s 9437873.763op/s 9482877.336op/s 9485869.889op/s 1.16% 0.256 0.023 0.41% 2716.676op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 21.696µs 22.592µs ± 0.430µs 22.564µs ± 0.288µs 22.869µs 23.354µs 23.584µs 23.730µs 5.17% 0.225 -0.282 1.90% 0.030µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 42140958.309op/s 44279788.663op/s ± 839324.608op/s 44319311.361op/s ± 563889.398op/s 44833197.305op/s 45712186.766op/s 45873378.895op/s 46091757.988op/s 4.00% -0.131 -0.345 1.89% 59349.212op/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.416µs; 2.417µs] or [-0.005%; +0.005%] None None None
credit_card/is_card_number/ throughput [413802825.755op/s; 413847366.758op/s] or [-0.005%; +0.005%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [115.254µs; 115.614µs] or [-0.156%; +0.156%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [8650441.610op/s; 8677682.496op/s] or [-0.157%; +0.157%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [107.037µs; 107.413µs] or [-0.175%; +0.175%] None None None
credit_card/is_card_number/ 378282246310005 throughput [9311356.337op/s; 9344021.296op/s] or [-0.175%; +0.175%] None None None
credit_card/is_card_number/37828224631 execution_time [2.416µs; 2.417µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631 throughput [413761733.126op/s; 413838177.154op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/378282246310005 execution_time [105.629µs; 106.073µs] or [-0.210%; +0.210%] None None None
credit_card/is_card_number/378282246310005 throughput [9429314.520op/s; 9469588.398op/s] or [-0.213%; +0.213%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [106.517µs; 106.623µs] or [-0.050%; +0.050%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [9378938.076op/s; 9388297.518op/s] or [-0.050%; +0.050%] None None None
credit_card/is_card_number/x371413321323331 execution_time [22.379µs; 22.480µs] or [-0.226%; +0.226%] None None None
credit_card/is_card_number/x371413321323331 throughput [44496618.625op/s; 44696523.883op/s] or [-0.224%; +0.224%] None None None
credit_card/is_card_number_no_luhn/ execution_time [2.416µs; 2.417µs] or [-0.005%; +0.005%] None None None
credit_card/is_card_number_no_luhn/ throughput [413811249.518op/s; 413854088.798op/s] or [-0.005%; +0.005%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [87.278µs; 87.357µs] or [-0.045%; +0.045%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [11447438.561op/s; 11457637.603op/s] or [-0.045%; +0.045%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [80.186µs; 80.352µs] or [-0.104%; +0.104%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [12446112.754op/s; 12471526.899op/s] or [-0.102%; +0.102%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [2.416µs; 2.417µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [413760973.995op/s; 413828330.305op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [76.993µs; 77.107µs] or [-0.074%; +0.074%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [12969573.929op/s; 12988443.900op/s] or [-0.073%; +0.073%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [106.549µs; 106.670µs] or [-0.057%; +0.057%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [9374872.699op/s; 9385521.875op/s] or [-0.057%; +0.057%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [22.532µs; 22.651µs] or [-0.264%; +0.264%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [44163466.344op/s; 44396110.981op/s] or [-0.263%; +0.263%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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.685µs 2.736µs ± 0.017µs 2.739µs ± 0.008µs 2.747µs 2.756µs 2.762µs 2.765µs 0.93% -1.115 0.944 0.62% 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.733µs; 2.738µs] or [-0.087%; +0.087%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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.355µs 3.162µs ± 1.528µs 3.007µs ± 0.024µs 3.030µs 3.084µs 13.712µs 17.404µs 478.73% 7.941 63.568 48.21% 0.108µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [2.950µs; 3.373µs] or [-6.699%; +6.699%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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.134µs 1.197µs ± 0.023µs 1.203µs ± 0.013µs 1.215µs 1.218µs 1.219µs 1.220µs 1.37% -1.318 0.985 1.89% 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.194µs; 1.200µs] or [-0.263%; +0.263%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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 275.753µs 276.316µs ± 0.177µs 276.285µs ± 0.111µs 276.420µs 276.611µs 276.760µs 276.994µs 0.26% 0.603 0.877 0.06% 0.013µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 3610180.660op/s 3619046.381op/s ± 2320.558op/s 3619452.962op/s ± 1455.864op/s 3620475.989op/s 3622096.528op/s 3622904.003op/s 3626437.429op/s 0.19% -0.598 0.871 0.06% 164.088op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 28.057µs 28.117µs ± 0.038µs 28.114µs ± 0.028µs 28.139µs 28.192µs 28.228µs 28.235µs 0.43% 0.950 0.385 0.14% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 35417313.004op/s 35565659.788op/s ± 48621.714op/s 35569607.414op/s ± 34999.773op/s 35605250.747op/s 35622057.982op/s 35625867.987op/s 35641851.485op/s 0.20% -0.944 0.368 0.14% 3438.074op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 16.501µs 16.546µs ± 0.038µs 16.532µs ± 0.018µs 16.563µs 16.622µs 16.691µs 16.712µs 1.09% 1.719 3.410 0.23% 0.003µs 1 200
normalization/normalize_name/normalize_name/good throughput 59837182.014op/s 60436485.328op/s ± 139719.160op/s 60490221.995op/s ± 64670.227op/s 60539123.991op/s 60562744.402op/s 60589590.021op/s 60600893.812op/s 0.18% -1.702 3.327 0.23% 9879.637op/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 [276.291µs; 276.341µs] or [-0.009%; +0.009%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [3618724.774op/s; 3619367.988op/s] or [-0.009%; +0.009%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [28.112µs; 28.122µs] or [-0.019%; +0.019%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [35558921.286op/s; 35572398.290op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_name/normalize_name/good execution_time [16.541µs; 16.552µs] or [-0.032%; +0.032%] None None None
normalization/normalize_name/normalize_name/good throughput [60417121.596op/s; 60455849.060op/s] or [-0.032%; +0.032%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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 17.623µs 21.389µs ± 8.256µs 17.852µs ± 0.118µs 18.021µs 36.040µs 36.837µs 89.037µs 398.74% 3.582 21.298 38.50% 0.584µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [20.245µs; 22.533µs] or [-5.350%; +5.350%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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 297.770ns 307.419ns ± 12.288ns 301.949ns ± 2.725ns 307.318ns 336.712ns 344.938ns 345.924ns 14.56% 1.860 2.239 3.99% 0.869ns 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 [305.716ns; 309.122ns] or [-0.554%; +0.554%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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 8.986ms 9.024ms ± 0.016ms 9.024ms ± 0.009ms 9.033ms 9.049ms 9.065ms 9.091ms 0.74% 0.521 1.292 0.17% 0.001ms 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.022ms; 9.026ms] or [-0.024%; +0.024%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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.977µs 39.540µs ± 1.009µs 39.085µs ± 0.043µs 39.136µs 41.715µs 41.781µs 42.320µs 8.28% 1.709 0.957 2.55% 0.071µ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 [39.400µs; 39.680µs] or [-0.354%; +0.354%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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 537.570µs 538.119µs ± 0.316µs 538.063µs ± 0.179µs 538.291µs 538.652µs 539.287µs 539.402µs 0.25% 1.074 2.231 0.06% 0.022µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1853903.667op/s 1858325.513op/s ± 1092.111op/s 1858518.427op/s ± 616.757op/s 1859040.191op/s 1859927.900op/s 1860124.765op/s 1860221.633op/s 0.09% -1.069 2.211 0.06% 77.224op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 466.780µs 467.294µs ± 0.235µs 467.310µs ± 0.146µs 467.439µs 467.661µs 467.849µs 468.062µs 0.16% 0.087 -0.001 0.05% 0.017µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2136468.139op/s 2139982.403op/s ± 1076.974op/s 2139906.043op/s ± 667.600op/s 2140721.331op/s 2141876.960op/s 2142190.134op/s 2142337.586op/s 0.11% -0.084 -0.004 0.05% 76.154op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 184.535µs 185.075µs ± 0.234µs 185.066µs ± 0.141µs 185.205µs 185.481µs 185.659µs 186.033µs 0.52% 0.722 1.238 0.13% 0.017µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5375385.331op/s 5403211.351op/s ± 6838.464op/s 5403488.994op/s ± 4126.861op/s 5407801.098op/s 5413654.352op/s 5415765.137op/s 5419024.733op/s 0.29% -0.711 1.209 0.13% 483.552op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 44.666µs 44.731µs ± 0.033µs 44.728µs ± 0.023µs 44.753µs 44.793µs 44.809µs 44.835µs 0.24% 0.374 -0.040 0.07% 0.002µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 22304038.357op/s 22355723.231op/s ± 16429.691op/s 22357522.583op/s ± 11402.343op/s 22366750.188op/s 22382435.768op/s 22386417.638op/s 22388635.716op/s 0.14% -0.370 -0.045 0.07% 1161.755op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 49.737µs 49.826µs ± 0.098µs 49.812µs ± 0.053µs 49.867µs 49.934µs 49.998µs 50.888µs 2.16% 6.427 66.122 0.20% 0.007µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 19650850.093op/s 20069820.412op/s ± 39120.204op/s 20075577.549op/s ± 21559.953op/s 20095366.535op/s 20102298.023op/s 20104506.075op/s 20105737.476op/s 0.15% -6.270 63.843 0.19% 2766.216op/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 [538.075µs; 538.163µs] or [-0.008%; +0.008%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1858174.157op/s; 1858476.869op/s] or [-0.008%; +0.008%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [467.261µs; 467.326µs] or [-0.007%; +0.007%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2139833.144op/s; 2140131.661op/s] or [-0.007%; +0.007%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [185.043µs; 185.108µs] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5402263.606op/s; 5404159.096op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [44.727µs; 44.736µs] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [22353446.234op/s; 22358000.228op/s] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [49.813µs; 49.840µs] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [20064398.728op/s; 20075242.096op/s] or [-0.027%; +0.027%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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 72.101µs 72.223µs ± 0.143µs 72.202µs ± 0.028µs 72.231µs 72.314µs 72.781µs 73.868µs 2.31% 8.334 87.120 0.20% 0.010µ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 [72.203µs; 72.243µs] or [-0.028%; +0.028%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3475380 1726819201 vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload
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 143.893µs 144.690µs ± 0.415µs 144.585µs ± 0.167µs 144.804µs 145.471µs 145.974µs 147.932µs 2.31% 3.068 18.268 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 [144.633µs; 144.748µs] or [-0.040%; +0.040%] None None None

Baseline

Omitted due to size.

@bantonsson
Copy link
Contributor

bantonsson commented Aug 9, 2024

You need to rebase on main if you want the benchmarks numbers to make sense.

And I see your PR is into your own branch, so I'll keep quiet...

@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/data-pipeline/add-stats-bucket branch from ea7bee7 to a517d6b Compare August 22, 2024 11:54
Base automatically changed from vianney/data-pipeline/add-stats-bucket to main August 22, 2024 13:18
An error occurred while trying to automatically change base from vianney/data-pipeline/add-stats-bucket to main August 22, 2024 13:18
@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload branch from e9e4aa7 to 694a478 Compare August 26, 2024 11:04
@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload branch 2 times, most recently from a2b6a86 to e5a6b88 Compare August 26, 2024 12:04
@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload branch from 658871f to 685eeb4 Compare August 26, 2024 12:33
@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload branch from ae59bb7 to d7c25af Compare August 26, 2024 13:11
@VianneyRuhlmann VianneyRuhlmann marked this pull request as ready for review August 26, 2024 16:30
@VianneyRuhlmann VianneyRuhlmann requested review from a team as code owners August 26, 2024 16:30
@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload branch from 9b5e087 to 8895da2 Compare August 27, 2024 12:20
Copy link
Contributor

@ajgajg1134 ajgajg1134 left a comment

Choose a reason for hiding this comment

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

Overall this looks good to me just a few small comments!

Is there anyway to run this with a real test application / real traces+stats and make sure they show up in the datadog UI? The unit tests look good but it's always nice to have a smoke test or equivalent

data-pipeline/src/stats_exporter.rs Outdated Show resolved Hide resolved
data-pipeline/src/stats_exporter.rs Outdated Show resolved Hide resolved
data-pipeline/src/trace_exporter.rs Outdated Show resolved Hide resolved
data-pipeline/src/trace_exporter.rs Outdated Show resolved Hide resolved
data-pipeline/src/trace_exporter.rs Outdated Show resolved Hide resolved
data-pipeline/src/trace_exporter.rs Show resolved Hide resolved
data-pipeline/src/trace_exporter.rs Outdated Show resolved Hide resolved
@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload branch from 6a0e9ad to 01cfcfb Compare September 18, 2024 15:51
.set_response_callback(Box::new(callback_wrapper));
if compute_stats {
builder = builder.enable_stats(Duration::from_secs(10))
// TODO: Enable peer tags aggregation and stats by span_kind based on agent
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking nit: I prefer putting the ticket ID right after the TODO.

@VianneyRuhlmann VianneyRuhlmann force-pushed the vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload branch from e614416 to b01b838 Compare September 19, 2024 11:40
@VianneyRuhlmann VianneyRuhlmann merged commit 09d1ef5 into main Sep 20, 2024
30 checks passed
@VianneyRuhlmann VianneyRuhlmann deleted the vianney/data-pipeline/APMSP-1013-stats-can-be-computed-from-the-spans-payload branch September 20, 2024 09:10
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.

6 participants