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

[crashtracker] Enable client to configure which signals to trap #856

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

danielsn
Copy link
Contributor

@danielsn danielsn commented Feb 5, 2025

What does this PR do?

Instead of hardcoding the signals to trap, allow the client to specify them

Motivation

We wanted to catch sigabort and sigill in addition to sigsegv and sigbus, and I figured lets just make it generic.

Additional Notes

Anything else we should know when reviewing?

How to test the change?

@danielsn danielsn requested review from a team as code owners February 5, 2025 17:43
SigHandler::Handler(f) => f(signum),
SigHandler::SigAction(f) => f(signum, sig_info, ucontext),
};
eprintln!("Unexpected signal number {signum}, can't chain the handlers");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What should we do here? abort?

unsafe { create_alt_stack()? };
}
let mut old_handlers = HashMap::new();
// TODO: if this fails, we end in a situation where handlers have been registered with no chain
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What to do here?

let boxed_ptr = Box::into_raw(Box::new(old_handlers));

let res = OLD_HANDLERS.compare_exchange(ptr::null_mut(), boxed_ptr, SeqCst, SeqCst);
anyhow::ensure!(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This leaks the old_handlers, if we care?

@@ -674,9 +665,11 @@ pub fn restore_old_handlers(inside_signal_handler: bool) -> anyhow::Result<()> {
anyhow::ensure!(!prev.is_null(), "No crashtracking previous signal handlers");
// Safety: The only nonnull pointer stored here comes from Box::into_raw()
let prev = unsafe { Box::from_raw(prev) };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could flip this around, and only rehydrate into a box when we are ready to drop it

@pr-commenter
Copy link

pr-commenter bot commented Feb 5, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-02-07 21:47:55

Comparing candidate commit ab7383e in PR branch dsn/crashtracker-many-signals with baseline commit b581706 in branch main.

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

scenario:credit_card/is_card_number/37828224631000521389798

  • 🟥 execution_time [+10.201µs; +10.223µs] or [+17.269%; +17.307%]
  • 🟥 throughput [-2497853.906op/s; -2492817.156op/s] or [-14.755%; -14.725%]

scenario:credit_card/is_card_number_no_luhn/37828224631000521389798

  • 🟥 execution_time [+10.176µs; +10.198µs] or [+17.225%; +17.263%]
  • 🟥 throughput [-2492120.152op/s; -2486987.927op/s] or [-14.723%; -14.692%]

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 ab7383e 1738964283 dsn/crashtracker-many-signals
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 57.739ms 58.031ms ± 0.187ms 57.962ms ± 0.041ms 58.027ms 58.453ms 58.629ms 58.996ms 1.78% 2.090 4.738 0.32% 0.013ms 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 [58.005ms; 58.057ms] or [-0.045%; +0.045%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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.840µs 77.162µs ± 0.173µs 77.147µs ± 0.030µs 77.181µs 77.272µs 77.341µs 79.354µs 2.86% 10.422 129.143 0.22% 0.012µ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 [77.138µs; 77.186µs] or [-0.031%; +0.031%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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.446µs 144.700µs ± 0.336µs 144.697µs ± 0.131µs 144.822µs 145.089µs 145.829µs 147.109µs 1.67% 1.892 14.532 0.23% 0.024µ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.653µs; 144.746µs] or [-0.032%; +0.032%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
ip_address/quantize_peer_ip_address_benchmark execution_time 5.441µs 5.488µs ± 0.036µs 5.475µs ± 0.015µs 5.517µs 5.554µs 5.558µs 5.631µs 2.84% 0.951 0.070 0.66% 0.003µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.483µs; 5.493µs] or [-0.092%; +0.092%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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 39.180µs 39.814µs ± 1.138µs 39.305µs ± 0.038µs 39.347µs 42.237µs 42.280µs 43.874µs 11.63% 1.760 1.271 2.85% 0.080µ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.657µs; 39.972µs] or [-0.396%; +0.396%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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.356µs ± 1.490µs 3.155µs ± 0.026µs 3.181µs 3.809µs 14.537µs 15.659µs 396.33% 7.432 56.003 44.29% 0.105µ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.150µs; 3.563µs] or [-6.153%; +6.153%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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 6.232ms 6.246ms ± 0.012ms 6.244ms ± 0.003ms 6.247ms 6.256ms 6.308ms 6.338ms 1.51% 5.073 30.488 0.20% 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 [6.244ms; 6.247ms] or [-0.027%; +0.027%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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 4.269µs 4.286µs ± 0.003µs 4.286µs ± 0.002µs 4.288µs 4.291µs 4.294µs 4.295µs 0.22% -0.495 5.705 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 232827570.136op/s 233311663.425op/s ± 162049.059op/s 233332450.256op/s ± 83963.627op/s 233399358.153op/s 233516428.988op/s 233704129.249op/s 234257052.854op/s 0.40% 0.511 5.776 0.07% 11458.599op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 96.526µs 98.065µs ± 0.763µs 98.050µs ± 0.472µs 98.452µs 99.207µs 99.799µs 103.650µs 5.71% 2.101 13.102 0.78% 0.054µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 9647834.375op/s 10197938.146op/s ± 78103.676op/s 10198832.680op/s ± 49217.393op/s 10250694.418op/s 10298249.252op/s 10343193.451op/s 10359903.031op/s 1.58% -1.867 11.068 0.76% 5522.764op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 90.259µs 91.771µs ± 0.647µs 91.776µs ± 0.283µs 92.071µs 92.551µs 92.830µs 97.587µs 6.33% 3.387 31.139 0.70% 0.046µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 10247307.003op/s 10897194.425op/s ± 75181.460op/s 10896044.192op/s ± 33446.287op/s 10928112.570op/s 11011531.077op/s 11056751.764op/s 11079180.259op/s 1.68% -2.954 26.567 0.69% 5316.132op/s 1 200
credit_card/is_card_number/37828224631 execution_time 4.265µs 4.286µs ± 0.004µs 4.286µs ± 0.001µs 4.287µs 4.290µs 4.291µs 4.334µs 1.13% 5.529 65.326 0.10% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 230740599.224op/s 233324456.893op/s ± 243365.211op/s 233336520.825op/s ± 78842.997op/s 233404644.754op/s 233581861.172op/s 233720930.628op/s 234474620.634op/s 0.49% -5.414 64.055 0.10% 17208.519op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 83.321µs 83.903µs ± 0.275µs 83.883µs ± 0.175µs 84.056µs 84.466µs 84.555µs 84.664µs 0.93% 0.388 -0.034 0.33% 0.019µs 1 200
credit_card/is_card_number/378282246310005 throughput 11811373.546op/s 11918586.690op/s ± 38992.879op/s 11921379.695op/s ± 24847.367op/s 11946452.720op/s 11980340.800op/s 11995754.393op/s 12001836.281op/s 0.67% -0.371 -0.052 0.33% 2757.213op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 69.104µs 69.281µs ± 0.071µs 69.289µs ± 0.052µs 69.322µs 69.396µs 69.446µs 69.488µs 0.29% 0.066 -0.232 0.10% 0.005µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 14390889.713op/s 14434039.139op/s ± 14863.250op/s 14432218.365op/s ± 10862.177op/s 14445193.491op/s 14459357.061op/s 14465897.374op/s 14470916.352op/s 0.27% -0.060 -0.234 0.10% 1050.990op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.832µs 6.842µs ± 0.004µs 6.842µs ± 0.002µs 6.844µs 6.848µs 6.855µs 6.860µs 0.26% 0.513 1.938 0.06% 0.000µs 1 200
credit_card/is_card_number/x371413321323331 throughput 145777522.163op/s 146153207.561op/s ± 93192.343op/s 146156686.466op/s ± 43317.082op/s 146196155.041op/s 146319341.714op/s 146349034.559op/s 146368499.417op/s 0.14% -0.506 1.923 0.06% 6589.694op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 4.272µs 4.285µs ± 0.003µs 4.286µs ± 0.001µs 4.287µs 4.289µs 4.291µs 4.292µs 0.15% -1.000 3.781 0.06% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 232978309.260op/s 233349149.904op/s ± 138678.265op/s 233333464.965op/s ± 69172.486op/s 233403565.243op/s 233599157.298op/s 233752989.689op/s 234078218.229op/s 0.32% 1.008 3.815 0.06% 9806.034op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 75.600µs 76.227µs ± 0.195µs 76.226µs ± 0.133µs 76.359µs 76.525µs 76.703µs 76.759µs 0.70% -0.032 -0.013 0.26% 0.014µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 13027847.419op/s 13118746.425op/s ± 33630.805op/s 13118898.326op/s ± 22917.735op/s 13141312.231op/s 13173660.850op/s 13186429.740op/s 13227432.372op/s 0.83% 0.047 -0.007 0.26% 2378.057op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 66.063µs 66.567µs ± 0.197µs 66.582µs ± 0.142µs 66.711µs 66.883µs 66.974µs 67.130µs 0.82% -0.032 -0.338 0.30% 0.014µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 14896573.877op/s 15022548.052op/s ± 44558.398op/s 15019184.082op/s ± 31901.188op/s 15056942.040op/s 15095327.775op/s 15126206.074op/s 15137125.314op/s 0.79% 0.046 -0.339 0.30% 3150.755op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 4.270µs 4.286µs ± 0.003µs 4.286µs ± 0.001µs 4.287µs 4.291µs 4.294µs 4.302µs 0.37% 0.312 8.565 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 232463219.717op/s 233297637.748op/s ± 154475.541op/s 233312192.957op/s ± 75296.587op/s 233390926.928op/s 233454045.783op/s 233616588.065op/s 234173099.069op/s 0.37% -0.291 8.583 0.07% 10923.070op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 62.492µs 63.060µs ± 0.200µs 63.066µs ± 0.141µs 63.195µs 63.385µs 63.441µs 63.570µs 0.80% -0.069 -0.409 0.32% 0.014µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 15730748.161op/s 15858007.059op/s ± 50226.249op/s 15856343.523op/s ± 35474.017op/s 15893058.310op/s 15934890.482op/s 15955602.905op/s 16002160.996op/s 0.92% 0.084 -0.402 0.32% 3551.532op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 69.092µs 69.265µs ± 0.070µs 69.268µs ± 0.049µs 69.307µs 69.389µs 69.422µs 69.454µs 0.27% 0.048 -0.215 0.10% 0.005µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 14398005.966op/s 14437400.846op/s ± 14639.839op/s 14436756.180op/s ± 10200.375op/s 14447654.342op/s 14462510.930op/s 14467407.494op/s 14473488.910op/s 0.25% -0.042 -0.218 0.10% 1035.193op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.833µs 6.843µs ± 0.004µs 6.843µs ± 0.002µs 6.845µs 6.849µs 6.852µs 6.853µs 0.15% -0.317 0.646 0.05% 0.000µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 145921610.751op/s 146141234.115op/s ± 77506.161op/s 146135992.435op/s ± 44020.144op/s 146181738.248op/s 146290872.978op/s 146349187.630op/s 146356015.513op/s 0.15% 0.321 0.647 0.05% 5480.513op/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 [4.286µs; 4.287µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ throughput [233289204.984op/s; 233334121.866op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [97.959µs; 98.171µs] or [-0.108%; +0.108%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [10187113.728op/s; 10208762.564op/s] or [-0.106%; +0.106%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [91.681µs; 91.861µs] or [-0.098%; +0.098%] None None None
credit_card/is_card_number/ 378282246310005 throughput [10886774.997op/s; 10907613.852op/s] or [-0.096%; +0.096%] None None None
credit_card/is_card_number/37828224631 execution_time [4.285µs; 4.287µs] or [-0.015%; +0.015%] None None None
credit_card/is_card_number/37828224631 throughput [233290728.815op/s; 233358184.970op/s] or [-0.014%; +0.014%] None None None
credit_card/is_card_number/378282246310005 execution_time [83.865µs; 83.942µs] or [-0.045%; +0.045%] None None None
credit_card/is_card_number/378282246310005 throughput [11913182.652op/s; 11923990.728op/s] or [-0.045%; +0.045%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [69.271µs; 69.291µs] or [-0.014%; +0.014%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [14431979.236op/s; 14436099.043op/s] or [-0.014%; +0.014%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.842µs; 6.843µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/x371413321323331 throughput [146140291.998op/s; 146166123.123op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/ execution_time [4.285µs; 4.286µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/ throughput [233329930.430op/s; 233368369.378op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [76.200µs; 76.254µs] or [-0.036%; +0.036%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [13114085.519op/s; 13123407.331op/s] or [-0.036%; +0.036%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [66.540µs; 66.595µs] or [-0.041%; +0.041%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [15016372.687op/s; 15028723.418op/s] or [-0.041%; +0.041%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [4.286µs; 4.287µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [233276228.924op/s; 233319046.573op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [63.033µs; 63.088µs] or [-0.044%; +0.044%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [15851046.184op/s; 15864967.934op/s] or [-0.044%; +0.044%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [69.255µs; 69.274µs] or [-0.014%; +0.014%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [14435371.905op/s; 14439429.787op/s] or [-0.014%; +0.014%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.842µs; 6.843µs] or [-0.007%; +0.007%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [146130492.507op/s; 146151975.724op/s] or [-0.007%; +0.007%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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 261.351ns 273.919ns ± 16.322ns 265.914ns ± 2.777ns 277.755ns 311.219ns 323.001ns 326.670ns 22.85% 1.713 1.857 5.94% 1.154ns 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 [271.657ns; 276.181ns] or [-0.826%; +0.826%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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 427.944µs 430.045µs ± 1.665µs 429.654µs ± 0.409µs 430.092µs 433.769µs 437.190µs 437.777µs 1.89% 2.785 8.388 0.39% 0.118µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 2284266.974op/s 2325374.496op/s ± 8907.574op/s 2327456.080op/s ± 2213.804op/s 2329414.569op/s 2333491.826op/s 2336037.057op/s 2336755.434op/s 0.40% -2.755 8.215 0.38% 629.861op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 470.083µs 470.878µs ± 0.311µs 470.859µs ± 0.185µs 471.053µs 471.509µs 471.739µs 471.758µs 0.19% 0.493 0.523 0.07% 0.022µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2119732.061op/s 2123692.286op/s ± 1403.335op/s 2123776.963op/s ± 835.141op/s 2124552.327op/s 2125839.209op/s 2126407.752op/s 2127282.476op/s 0.17% -0.488 0.517 0.07% 99.231op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 162.008µs 162.681µs ± 0.237µs 162.679µs ± 0.168µs 162.853µs 163.047µs 163.138µs 163.357µs 0.42% -0.173 -0.041 0.15% 0.017µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 6121561.126op/s 6147012.692op/s ± 8969.565op/s 6147081.355op/s ± 6362.334op/s 6152906.867op/s 6161550.383op/s 6168348.342op/s 6172521.701op/s 0.41% 0.181 -0.037 0.15% 634.244op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 45.496µs 45.699µs ± 0.070µs 45.698µs ± 0.046µs 45.749µs 45.807µs 45.858µs 45.879µs 0.40% -0.129 0.342 0.15% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 21796425.565op/s 21882225.683op/s ± 33306.977op/s 21882777.707op/s ± 22021.635op/s 21904458.379op/s 21930434.948op/s 21971760.753op/s 21980037.008op/s 0.44% 0.139 0.351 0.15% 2355.159op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 42.919µs 43.174µs ± 0.121µs 43.177µs ± 0.046µs 43.209µs 43.277µs 43.381µs 44.540µs 3.16% 7.118 79.102 0.28% 0.009µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 22451537.015op/s 23162165.482op/s ± 63760.804op/s 23160490.620op/s ± 24583.305op/s 23188975.669op/s 23232684.686op/s 23258179.831op/s 23299650.986op/s 0.60% -6.866 75.467 0.27% 4508.570op/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 [429.814µs; 430.275µs] or [-0.054%; +0.054%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [2324139.992op/s; 2326609.001op/s] or [-0.053%; +0.053%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [470.835µs; 470.921µs] or [-0.009%; +0.009%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2123497.797op/s; 2123886.775op/s] or [-0.009%; +0.009%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [162.648µs; 162.714µs] or [-0.020%; +0.020%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [6145769.597op/s; 6148255.788op/s] or [-0.020%; +0.020%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [45.690µs; 45.709µs] or [-0.021%; +0.021%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [21877609.657op/s; 21886841.710op/s] or [-0.021%; +0.021%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [43.157µs; 43.191µs] or [-0.039%; +0.039%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [23153328.848op/s; 23171002.117op/s] or [-0.038%; +0.038%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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 211.909µs 220.131µs ± 2.783µs 220.065µs ± 1.696µs 221.799µs 224.654µs 226.403µs 228.117µs 3.66% -0.095 0.224 1.26% 0.197µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4383712.705op/s 4543478.457op/s ± 57548.226op/s 4544106.535op/s ± 35126.494op/s 4578950.406op/s 4628318.618op/s 4702464.206op/s 4719012.311op/s 3.85% 0.180 0.293 1.26% 4069.274op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 20.478µs 20.904µs ± 0.149µs 20.900µs ± 0.093µs 20.990µs 21.153µs 21.253µs 21.570µs 3.21% 0.572 1.439 0.71% 0.011µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 46360611.380op/s 47841276.079op/s ± 338994.961op/s 47846999.736op/s ± 213849.478op/s 48079048.646op/s 48337469.563op/s 48504412.554op/s 48833598.875op/s 2.06% -0.507 1.261 0.71% 23970.564op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 13.125µs 13.378µs ± 0.073µs 13.379µs ± 0.048µs 13.430µs 13.485µs 13.513µs 13.547µs 1.25% -0.360 -0.050 0.54% 0.005µs 1 200
normalization/normalize_name/normalize_name/good throughput 73818162.432op/s 74754385.146op/s ± 408590.025op/s 74742516.784op/s ± 267821.252op/s 74998036.156op/s 75458583.847op/s 75726103.840op/s 76187619.875op/s 1.93% 0.389 -0.003 0.55% 28891.678op/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 [219.745µs; 220.517µs] or [-0.175%; +0.175%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4535502.827op/s; 4551454.088op/s] or [-0.176%; +0.176%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [20.883µs; 20.924µs] or [-0.099%; +0.099%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [47794294.638op/s; 47888257.520op/s] or [-0.098%; +0.098%] None None None
normalization/normalize_name/normalize_name/good execution_time [13.367µs; 13.388µs] or [-0.076%; +0.076%] None None None
normalization/normalize_name/normalize_name/good throughput [74697758.498op/s; 74811011.794op/s] or [-0.076%; +0.076%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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.677µs 2.753µs ± 0.022µs 2.753µs ± 0.012µs 2.768µs 2.784µs 2.793µs 2.797µs 1.61% -0.970 1.430 0.81% 0.002µ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.750µs; 2.756µs] or [-0.113%; +0.113%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ab7383e 1738964283 dsn/crashtracker-many-signals
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.644µs 28.772µs ± 14.106µs 19.538µs ± 0.525µs 37.604µs 46.921µs 56.898µs 148.893µs 662.09% 3.778 26.677 48.90% 0.997µ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.818µs; 30.727µs] or [-6.794%; +6.794%] None None None

Baseline

Omitted due to size.

before_len == signals.len(),
"Signals contained duplicate elements"
);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could also check that the ints are valid here?

ddog_crasht_Config config = {
.create_alt_stack = false,
.endpoint = endpoint,
.resolve_frames = DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_INPROCESS_SYMBOLS,
.signals = INIT_FROM_SLICE(signals),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a nicer way to do this?

@danielsn danielsn force-pushed the dsn/crashtracker-many-signals branch from 8050f45 to 90442a0 Compare February 6, 2025 02:57
@@ -320,6 +328,7 @@ fn test_altstack_use_create() -> anyhow::Result<()> {
eprintln!("Expected SIGSEGV handler to have SA_ONSTACK");
std::process::exit(-9);
}
// TODO, the other signals
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reminder to myself

@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 25.13966% with 134 lines in your changes missing coverage. Please review.

Project coverage is 71.81%. Comparing base (f2fb806) to head (5037260).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #856      +/-   ##
==========================================
- Coverage   72.08%   71.81%   -0.28%     
==========================================
  Files         323      323              
  Lines       47941    48207     +266     
==========================================
+ Hits        34560    34618      +58     
- Misses      13381    13589     +208     
Components Coverage Δ
crashtracker 42.69% <26.47%> (-0.57%) ⬇️
crashtracker-ffi 6.25% <0.00%> (-0.03%) ⬇️
datadog-alloc 98.73% <ø> (ø)
data-pipeline 92.37% <ø> (+0.14%) ⬆️
data-pipeline-ffi 91.43% <ø> (+1.50%) ⬆️
ddcommon 80.08% <ø> (-0.54%) ⬇️
ddcommon-ffi 61.05% <ø> (-1.07%) ⬇️
ddtelemetry 61.74% <ø> (ø)
ddtelemetry-ffi 22.46% <ø> (ø)
dogstatsd 90.01% <ø> (ø)
dogstatsd-client 79.77% <ø> (ø)
ipc 82.68% <ø> (ø)
profiling 79.41% <ø> (-0.58%) ⬇️
profiling-ffi 70.68% <ø> (+0.24%) ⬆️
serverless 0.00% <ø> (ø)
sidecar 41.50% <ø> (-0.60%) ⬇️
sidecar-ffi 9.26% <ø> (-3.89%) ⬇️
spawn-worker 54.37% <ø> (ø)
tinybytes 92.79% <ø> (-0.81%) ⬇️
trace-mini-agent 72.48% <ø> (ø)
trace-normalization 98.23% <ø> (ø)
trace-obfuscation 95.96% <ø> (ø)
trace-protobuf 77.67% <ø> (ø)
trace-utils 94.21% <ø> (ø)

@ivoanjo
Copy link
Member

ivoanjo commented Feb 6, 2025

We wanted to catch sigabort and sigill in addition to sigsegv and sigbus, and I figured lets just make it generic.

One thing I strongly recommend is: let's put in some defaults!

In past features "leaving it up to implementer" often meant unintended inconsistency as things get picked semi-randomly; I think in general it's nice to have a pattern of "if you don't want to choose, we pick a reasonable default, don't worry about it".

@danielsn
Copy link
Contributor Author

danielsn commented Feb 7, 2025

We wanted to catch sigabort and sigill in addition to sigsegv and sigbus, and I figured lets just make it generic.

One thing I strongly recommend is: let's put in some defaults!

In past features "leaving it up to implementer" often meant unintended inconsistency as things get picked semi-randomly; I think in general it's nice to have a pattern of "if you don't want to choose, we pick a reasonable default, don't worry about it".

https://github.com/DataDog/libdatadog/pull/856/files#diff-fded76796d1b1945fd14d3cdb6230e4692e94608fc4887d26e2530a004df451aR59
https://github.com/DataDog/libdatadog/pull/856/files#diff-3b348b31125a4320ee4d0c7b041dee864d9f66c6dae0ed1410712314b63820bfR139-R143

@ivoanjo
Copy link
Member

ivoanjo commented Feb 7, 2025

One thing I strongly recommend is: let's put in some defaults!
[...]
https://github.com/DataDog/libdatadog/pull/856/files#diff-fded76796d1b1945fd14d3cdb6230e4692e94608fc4887d26e2530a004df451aR59
https://github.com/DataDog/libdatadog/pull/856/files#diff-3b348b31125a4320ee4d0c7b041dee864d9f66c6dae0ed1410712314b63820bfR139-R143

Ahaha my bad for scrolling too fast through the PR, and amazing work in getting this in :D :D :D

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