170 breaking releases

new 0.172.0 Nov 21, 2024
0.170.0 Nov 6, 2024
0.158.0 Jul 31, 2024
0.137.0 Mar 28, 2024
0.7.0 Jul 26, 2021

#45 in Profiling

Download history 402/week @ 2024-07-29 9/week @ 2024-08-05 16/week @ 2024-08-12 282/week @ 2024-08-19 135/week @ 2024-08-26 146/week @ 2024-09-02 7/week @ 2024-09-09 12/week @ 2024-09-16 36/week @ 2024-09-23 341/week @ 2024-09-30 196/week @ 2024-10-07 383/week @ 2024-10-14 171/week @ 2024-10-21 161/week @ 2024-10-28 316/week @ 2024-11-04 55/week @ 2024-11-11

722 downloads per month
Used in 15 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

~85MB
~1.5M SLoC