7 releases (breaking)

new 0.7.0 Jul 26, 2021
0.6.0 Jul 19, 2021
0.5.0 Jul 12, 2021
0.4.0 Jun 21, 2021
0.1.0 May 20, 2021

41 downloads per month
Used in 2 crates

MIT license

4.5MB
9K SLoC

Rust 7K SLoC // 0.1% comments TypeScript 1K SLoC // 0.1% comments JavaScript 831 SLoC // 0.2% comments

Benching utility for deno_core op system

Example:

use deno_bench_util::bench_or_profile;
use deno_bench_util::bencher::{benchmark_group, Bencher};
use deno_bench_util::bench_js_sync};

use deno_core::op_sync;
use deno_core::serialize_op_result;
use deno_core::JsRuntime;
use deno_core::Op;
use deno_core::OpState;

fn setup(runtime: &mut JsRuntime) {
  runtime.register_op("nop", |state, _| {
    Op::Sync(serialize_op_result(Ok(9), state))
  });
  runtime.sync_ops_cache();
}

fn bench_op_nop(b: &mut Bencher) {
  bench_js_sync(b, r#"Deno.core.opSync("nop", null, null, null);"#, setup);
}

benchmark_group!(benches, bench_op_nop);
bench_or_profile!(benches);

Dependencies

~52MB
~1M SLoC