From effb765d89e9c39062bab2ae500c65c2742074f7 Mon Sep 17 00:00:00 2001 From: SnowCait Date: Thu, 22 Aug 2024 23:29:37 +0900 Subject: [PATCH] Benchmarks --- rust-nostr.bench.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rust-nostr.bench.ts b/rust-nostr.bench.ts index 1dc3d4b..386bda2 100644 --- a/rust-nostr.bench.ts +++ b/rust-nostr.bench.ts @@ -1,5 +1,13 @@ import { EventBuilder, Keys, loadWasmAsync } from "npm:@rust-nostr/nostr"; +Deno.bench("loadWasmAsync", async (b) => { + b.start(); + + await loadWasmAsync(); + + b.end(); +}); + Deno.bench("generate", async (b) => { await loadWasmAsync();