193 breaking releases

new 0.195.0 Apr 14, 2025
0.193.0 Apr 5, 2025
0.191.0 Mar 28, 2025
0.178.0 Dec 19, 2024
0.7.0 Jul 26, 2021

#37 in Profiling

Download history 55/week @ 2024-12-30 134/week @ 2025-01-06 178/week @ 2025-01-13 183/week @ 2025-01-20 251/week @ 2025-01-27 59/week @ 2025-02-03 113/week @ 2025-02-10 296/week @ 2025-02-17 166/week @ 2025-02-24 167/week @ 2025-03-03 129/week @ 2025-03-10 170/week @ 2025-03-17 147/week @ 2025-03-24 260/week @ 2025-03-31 161/week @ 2025-04-07

753 downloads per month
Used in 15 crates

MIT license

16KB
177 lines

Benching utility for deno_core op system

Example:

use deno_bench_util::bench_js_sync;
use deno_bench_util::bench_or_profile;
use deno_bench_util::bencher::benchmark_group;
use deno_bench_util::bencher::Bencher;
use deno_core::Extension;

#[op2]
#[number]
fn op_nop() -> usize {
  9
}

fn setup() -> Vec<Extension> {
  vec![Extension {
    name: "my_ext"
    ops: std::borrow::Cow::Borrowed(&[op_nop::DECL])
  }]
}

fn bench_op_nop(b: &mut Bencher) {
  bench_js_sync(b, r#"Deno.core.ops.op_nop();"#, setup);
}

benchmark_group!(benches, bench_op_nop);
bench_or_profile!(benches);

Dependencies

~93MB
~2M SLoC