Skip to content

Commit 5305320

Browse files
authored
test: add nns_vote_cascading benchmarks (#371)
This PR adds NNS related benchmarks. Based on [this code](87b8cb5#diff-d4051865fc070278786bae10c12b92fdcfab289f11b8379c58d59eff01b09ae2). NNS benchmarks will be enabled in CI in follow-up PR, because they need to be present in `main` branch first.
1 parent b0c4723 commit 5305320

File tree

7 files changed

+986
-0
lines changed

7 files changed

+986
-0
lines changed

benchmarks/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ path = "io_chunks/src/main.rs"
3434
name = "memory_manager"
3535
path = "memory_manager/src/main.rs"
3636

37+
[[bin]]
38+
name = "nns"
39+
path = "nns/src/main.rs"
40+
3741
[[bin]]
3842
name = "vec"
3943
path = "vec/src/main.rs"

benchmarks/nns/canbench.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build_cmd: cargo build -p benchmarks --release --target wasm32-unknown-unknown --locked
2+
3+
wasm_path: ../../target/wasm32-unknown-unknown/release/nns.wasm
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
benches:
2+
vote_cascading_heap_centralized_10k:
3+
total:
4+
calls: 1
5+
instructions: 77758460
6+
heap_increase: 16
7+
stable_memory_increase: 0
8+
scopes: {}
9+
vote_cascading_heap_centralized_1k:
10+
total:
11+
calls: 1
12+
instructions: 7815132
13+
heap_increase: 1
14+
stable_memory_increase: 0
15+
scopes: {}
16+
vote_cascading_heap_chain_10k_15:
17+
total:
18+
calls: 1
19+
instructions: 1272207053
20+
heap_increase: 10
21+
stable_memory_increase: 0
22+
scopes: {}
23+
vote_cascading_heap_chain_10k_5:
24+
total:
25+
calls: 1
26+
instructions: 239648964
27+
heap_increase: 10
28+
stable_memory_increase: 0
29+
scopes: {}
30+
vote_cascading_heap_chain_1k_15:
31+
total:
32+
calls: 1
33+
instructions: 124352570
34+
heap_increase: 1
35+
stable_memory_increase: 0
36+
scopes: {}
37+
vote_cascading_heap_chain_1k_5:
38+
total:
39+
calls: 1
40+
instructions: 23867558
41+
heap_increase: 0
42+
stable_memory_increase: 0
43+
scopes: {}
44+
vote_cascading_heap_single_vote_10k:
45+
total:
46+
calls: 1
47+
instructions: 5639
48+
heap_increase: 0
49+
stable_memory_increase: 0
50+
scopes: {}
51+
vote_cascading_heap_single_vote_1k:
52+
total:
53+
calls: 1
54+
instructions: 5737
55+
heap_increase: 0
56+
stable_memory_increase: 0
57+
scopes: {}
58+
vote_cascading_stable_centralized_10k:
59+
total:
60+
calls: 1
61+
instructions: 1375361602
62+
heap_increase: 10
63+
stable_memory_increase: 0
64+
scopes: {}
65+
vote_cascading_stable_centralized_1k:
66+
total:
67+
calls: 1
68+
instructions: 99869278
69+
heap_increase: 1
70+
stable_memory_increase: 0
71+
scopes: {}
72+
vote_cascading_stable_chain_10k_15:
73+
total:
74+
calls: 1
75+
instructions: 9800292700
76+
heap_increase: 5
77+
stable_memory_increase: 0
78+
scopes: {}
79+
vote_cascading_stable_chain_10k_5:
80+
total:
81+
calls: 1
82+
instructions: 3004791001
83+
heap_increase: 5
84+
stable_memory_increase: 0
85+
scopes: {}
86+
vote_cascading_stable_chain_1k_15:
87+
total:
88+
calls: 1
89+
instructions: 865575963
90+
heap_increase: 0
91+
stable_memory_increase: 0
92+
scopes: {}
93+
vote_cascading_stable_chain_1k_5:
94+
total:
95+
calls: 1
96+
instructions: 252822713
97+
heap_increase: 0
98+
stable_memory_increase: 0
99+
scopes: {}
100+
vote_cascading_stable_single_vote_10k:
101+
total:
102+
calls: 1
103+
instructions: 91204
104+
heap_increase: 0
105+
stable_memory_increase: 0
106+
scopes: {}
107+
vote_cascading_stable_single_vote_1k:
108+
total:
109+
calls: 1
110+
instructions: 66626
111+
heap_increase: 0
112+
stable_memory_increase: 0
113+
scopes: {}
114+
version: 0.2.0

benchmarks/nns/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mod nns_vote_cascading;
2+
3+
fn main() {}

0 commit comments

Comments
 (0)