Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowCait committed Sep 30, 2024
1 parent a231562 commit f862a7d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ Full log is
Install [Deno](https://deno.com/).

```
deno bench --allow-env
deno bench
```

If you want to run NDK benchmark, add `--allow-env` flag at your own risk.

```
cpu: AMD EPYC 7763 64-Core Processor
runtime: deno 1.46.1 (x86_64-unknown-linux-gnu)
Expand Down
2 changes: 1 addition & 1 deletion ndk.bench.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import NDK, { NDKEvent, NDKPrivateKeySigner } from "npm:@nostr-dev-kit/ndk";
import { generateSecretKey } from "npm:nostr-tools";
import { generateSecretKey } from "nostr-tools";

Deno.bench("sign", async (b) => {
const seckey = generateSecretKey();
Expand Down
2 changes: 1 addition & 1 deletion nostr-tools.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
serializeEvent,
verifiedSymbol,
verifyEvent,
} from "npm:nostr-tools";
} from "nostr-tools";

Deno.bench("generateSecretKey", () => {
generateSecretKey();
Expand Down
2 changes: 1 addition & 1 deletion rust-nostr.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
loadWasmAsync,
loadWasmSync,
} from "npm:@rust-nostr/nostr";
import { finalizeEvent } from "npm:nostr-tools";
import { finalizeEvent } from "nostr-tools";
import { hexToBytes } from "npm:@noble/hashes/utils";
import { Event } from "npm:@rust-nostr/nostr";

Expand Down
2 changes: 1 addition & 1 deletion rx-nostr-crypto.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
seckeySigner,
verify,
} from "npm:rx-nostr-crypto";
import { generateSecretKey } from "npm:nostr-tools";
import { generateSecretKey } from "nostr-tools";
import { bytesToHex } from "npm:@noble/hashes/utils";
import { getSignature } from "npm:rx-nostr-crypto";

Expand Down

0 comments on commit f862a7d

Please sign in to comment.