194 breaking releases

new 0.196.0 Apr 18, 2025
0.194.0 Apr 11, 2025
0.191.0 Mar 28, 2025
0.178.0 Dec 19, 2024
0.7.0 Jul 26, 2021

#37 in Profiling

Download history 54/week @ 2024-12-27 64/week @ 2025-01-03 135/week @ 2025-01-10 280/week @ 2025-01-17 85/week @ 2025-01-24 231/week @ 2025-01-31 76/week @ 2025-02-07 203/week @ 2025-02-14 285/week @ 2025-02-21 165/week @ 2025-02-28 37/week @ 2025-03-07 171/week @ 2025-03-14 145/week @ 2025-03-21 142/week @ 2025-03-28 283/week @ 2025-04-04 236/week @ 2025-04-11

809 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