174 breaking releases

new 0.176.0 Dec 11, 2024
0.174.0 Nov 28, 2024
0.158.0 Jul 31, 2024
0.137.0 Mar 28, 2024
0.7.0 Jul 26, 2021

#26 in Profiling

Download history 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 298/week @ 2024-11-18 157/week @ 2024-11-25 156/week @ 2024-12-02

750 downloads per month
Used in 16 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