155 breaking releases

new 0.157.0 Jul 26, 2024
0.155.0 Jul 12, 2024
0.137.0 Mar 28, 2024
0.123.0 Dec 21, 2023
0.7.0 Jul 26, 2021

#54 in Profiling

Download history 81/week @ 2024-04-04 417/week @ 2024-04-11 18/week @ 2024-04-18 229/week @ 2024-04-25 106/week @ 2024-05-02 220/week @ 2024-05-09 306/week @ 2024-05-16 42/week @ 2024-05-23 212/week @ 2024-05-30 176/week @ 2024-06-06 395/week @ 2024-06-13 91/week @ 2024-06-20 7/week @ 2024-06-27 86/week @ 2024-07-04 284/week @ 2024-07-11 135/week @ 2024-07-18

517 downloads per month
Used in 12 crates

MIT license

8KB
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

~94MB
~2M SLoC