MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / single_sample_result

Function single_sample_result

xtask/src/main.rs:4338–4359  ·  view source on GitHub ↗
(
    id: &'static str,
    label: String,
    unit: &'static str,
    operation_count: usize,
    elapsed: Duration,
)

Source from the content-addressed store, hash-verified

4336}
4337
4338fn single_sample_result(
4339 id: &'static str,
4340 label: String,
4341 unit: &'static str,
4342 operation_count: usize,
4343 elapsed: Duration,
4344) -> BenchmarkTestResult {
4345 let elapsed_micros = elapsed.as_micros();
4346 BenchmarkTestResult {
4347 id,
4348 label,
4349 unit,
4350 operation_count,
4351 sample_count: 1,
4352 trimmed_sample_count: 1,
4353 elapsed_micros,
4354 average_micros: None,
4355 min_micros: Some(elapsed_micros),
4356 p50_micros: Some(elapsed_micros),
4357 p95_micros: Some(elapsed_micros),
4358 }
4359}
4360
4361fn percentile_sorted(sorted: &[u128], percentile: f64) -> Option<u128> {
4362 if sorted.is_empty() {

Calls

no outgoing calls

Tested by

no test coverage detected