Skip to content

Commit 0097efe

Browse files
committed
feat: track benchmark in CI
1 parent cffebbf commit 0097efe

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,9 @@ jobs:
7373
- name: Bun - Unit Tests
7474
run: bun test:unit
7575
working-directory: ./test/bun
76+
77+
- name: Benchmark
78+
run: bun benchmark
79+
env:
80+
# To write to PRs and commits
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

src/pubkey_index_map.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const AutoHashMap = std.AutoHashMap(Key, Val);
1010

1111
/// a generic implementation for both zig application and Bun ffi
1212
pub const PubkeyIndexMap = struct {
13-
// TODO: seems this HashMap allocates items using its own allocator
13+
// this HashMap copies key/value using its own allocator
1414
// this duplicates all items at Bun side
1515
map: AutoHashMap,
1616

test/bun/src/pubkeyIndexMap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const NOT_FOUND_INDEX = binding.getNotFoundIndex();
88
* This has the same interface to the napi-rs implementation in https://github.com/ChainSafe/pubkey-index-map/blob/main/index.d.ts
99
*/
1010
export class PubkeyIndexMap {
11-
// even through zig returns u64, it's safe to use number at Bun side
12-
// see https://bun.sh/docs/api/ffi#pointers
11+
// even through zig returns u64, it's safe to use number at Bun side
12+
// see https://bun.sh/docs/api/ffi#pointers
1313
private native_ptr: number;
1414
constructor() {
1515
const pointer = binding.createPubkeyIndexMap();

0 commit comments

Comments
 (0)