57 breaking releases

Uses new Rust 2021

new 0.59.0 Aug 11, 2022
0.57.0 Jul 28, 2022
0.39.0 Mar 31, 2022
0.24.0 Dec 22, 2021
0.7.0 Jul 26, 2021

#56 in Profiling

Download history 84/week @ 2022-04-21 261/week @ 2022-04-28 291/week @ 2022-05-05 769/week @ 2022-05-12 208/week @ 2022-05-19 287/week @ 2022-05-26 435/week @ 2022-06-02 49/week @ 2022-06-09 76/week @ 2022-06-16 54/week @ 2022-06-23 55/week @ 2022-06-30 143/week @ 2022-07-07 85/week @ 2022-07-14 213/week @ 2022-07-21 67/week @ 2022-07-28 55/week @ 2022-08-04

485 downloads per month
Used in 5 crates

MIT license

4.5MB
12K SLoC

Rust 10K SLoC // 0.1% comments TypeScript 1K SLoC // 0.1% comments JavaScript 880 SLoC // 0.1% 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::Extension;
use deno_core::JsRuntime;
use deno_core::Op;
use deno_core::OpState;

fn setup() -> Vec<Extension> {
  let custom_ext = Extension::builder()
    .ops(vec![
      ("op_nop", |state, _| {
        Op::Sync(serialize_op_result(Ok(9), state))
      }),
    ])
    .build();
  
  vec![
    // deno_{ext}::init(...),
    custom_ext,
  ]
}

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

~76MB
~1.5M SLoC