139 breaking releases

new 0.141.0 Apr 16, 2024
0.139.0 Apr 11, 2024
0.137.0 Mar 28, 2024
0.123.0 Dec 21, 2023
0.7.0 Jul 26, 2021

#95 in Profiling

Download history 11/week @ 2023-12-30 9/week @ 2024-01-06 7/week @ 2024-01-13 18/week @ 2024-01-20 5/week @ 2024-01-27 1/week @ 2024-02-03 117/week @ 2024-02-10 224/week @ 2024-02-17 322/week @ 2024-02-24 174/week @ 2024-03-02 146/week @ 2024-03-09 41/week @ 2024-03-16 114/week @ 2024-03-23 229/week @ 2024-03-30 122/week @ 2024-04-06

538 downloads per month
Used in 12 crates

MIT license

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

~91MB
~2M SLoC