Skip to content

Commit 63c9375

Browse files
committed
wip
1 parent ffcde4e commit 63c9375

File tree

2 files changed

+65
-64
lines changed

2 files changed

+65
-64
lines changed

benchmark/reports.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ async function generateOpcodeAnalysis() {
8080

8181
const tx = opcodes[0]
8282
markdown += `### ${tx.contract_name} - ${tx.transaction_name}\n\n`
83-
markdown += `**Total Gas Used:** ${tx.gas_used.toLocaleString()}\n`
83+
markdown +=
84+
`- **Total Gas Used:** ${tx.gas_used.toLocaleString()}\n`
8485

8586
// Display weight metrics if available
8687
if (
@@ -94,16 +95,16 @@ async function generateOpcodeAnalysis() {
9495
.toFixed(1)
9596

9697
markdown += [
97-
`**Base Call Weight:** ref_time=${tx.base_call_weight_ref_time.toLocaleString()}, proof_size=${
98+
`- **Base Call Weight:** ref_time=${tx.base_call_weight_ref_time.toLocaleString()}, proof_size=${
9899
tx.base_call_weight_proof_size?.toLocaleString() ??
99100
'N/A'
100101
}`,
101-
`**Total Weight:** ref_time=${totalRefTime.toLocaleString()}, proof_size=${
102+
`- **Total Weight:** ref_time=${totalRefTime.toLocaleString()}, proof_size=${
102103
((tx.base_call_weight_proof_size ?? 0) +
103104
(tx.weight_consumed_proof_size ?? 0))
104105
.toLocaleString()
105106
}`,
106-
`**Weight Consumed:** ref_time=${tx.weight_consumed_ref_time.toLocaleString()} (${weightConsumedPercent}% of total), proof_size=${
107+
`- **Weight Consumed:** ref_time=${tx.weight_consumed_ref_time.toLocaleString()} (${weightConsumedPercent}% of total), proof_size=${
107108
(tx.weight_consumed_proof_size ?? 0).toLocaleString()
108109
}`,
109110
].join('\n') + '\n'

benchmark/reports/opcode_analysis.md

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Generated on: 2025-12-19
66

77
### Fibonacci_evm - deploy
88

9-
**Total Gas Used:** 141,635
9+
- **Total Gas Used:** 141,635
1010

1111
| Opcode | Total Gas | Call Count | Avg Gas/Call | % of opcodes | % of tx Gas |
1212
| --------- | --------- | ---------- | ------------ | ------------ | ----------- |
@@ -26,7 +26,7 @@ Generated on: 2025-12-19
2626

2727
### Fibonacci_evm - fib_10
2828

29-
**Total Gas Used:** 62,284
29+
- **Total Gas Used:** 62,284
3030

3131
| Opcode | Total Gas | Call Count | Avg Gas/Call | % of opcodes | % of tx Gas |
3232
| ------------ | --------- | ---------- | ------------ | ------------ | ----------- |
@@ -54,7 +54,7 @@ Generated on: 2025-12-19
5454

5555
### SimpleToken_evm - deploy
5656

57-
**Total Gas Used:** 174,399
57+
- **Total Gas Used:** 174,399
5858

5959
| Opcode | Total Gas | Call Count | Avg Gas/Call | % of opcodes | % of tx Gas |
6060
| --------- | --------- | ---------- | ------------ | ------------ | ----------- |
@@ -74,7 +74,7 @@ Generated on: 2025-12-19
7474

7575
### SimpleToken_evm - mint
7676

77-
**Total Gas Used:** 68,273
77+
- **Total Gas Used:** 68,273
7878

7979
| Opcode | Total Gas | Call Count | Avg Gas/Call | % of opcodes | % of tx Gas |
8080
| ------------ | --------- | ---------- | ------------ | ------------ | ----------- |
@@ -104,10 +104,10 @@ Generated on: 2025-12-19
104104

105105
### Fibonacci_evm - deploy
106106

107-
**Total Gas Used:** 7,771,875
108-
**Base Call Weight:** ref_time=1,524,379,111, proof_size=6,934
109-
**Total Weight:** ref_time=1,525,942,458, proof_size=6,934
110-
**Weight Consumed:** ref_time=1,563,347 (0.1% of total), proof_size=0
107+
- **Total Gas Used:** 7,771,875
108+
- **Base Call Weight:** ref_time=1,524,379,111, proof_size=6,934
109+
- **Total Weight:** ref_time=1,525,942,458, proof_size=6,934
110+
- **Weight Consumed:** ref_time=1,563,347 (0.1% of total), proof_size=0
111111

112112
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
113113
| --------- | --------- | ---------- | ------------ | -------- | ---------- | ------------- | --------------- |
@@ -127,10 +127,10 @@ Generated on: 2025-12-19
127127

128128
### Fibonacci_evm - fib_10
129129

130-
**Total Gas Used:** 350,587
131-
**Base Call Weight:** ref_time=913,100,531, proof_size=8,432
132-
**Total Weight:** ref_time=1,533,530,869, proof_size=8,432
133-
**Weight Consumed:** ref_time=620,430,338 (40.5% of total), proof_size=0
130+
- **Total Gas Used:** 350,587
131+
- **Base Call Weight:** ref_time=913,100,531, proof_size=8,432
132+
- **Total Weight:** ref_time=1,533,530,869, proof_size=8,432
133+
- **Weight Consumed:** ref_time=620,430,338 (40.5% of total), proof_size=0
134134

135135
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
136136
| ------------ | --------- | ---------- | ------------ | ---------- | ---------- | ------------- | --------------- |
@@ -158,10 +158,10 @@ Generated on: 2025-12-19
158158

159159
### Fibonacci_pvm - deploy
160160

161-
**Total Gas Used:** 12,465,075
162-
**Base Call Weight:** ref_time=1,560,414,913, proof_size=6,934
163-
**Total Weight:** ref_time=1,570,958,680, proof_size=6,934
164-
**Weight Consumed:** ref_time=10,543,767 (0.7% of total), proof_size=0
161+
- **Total Gas Used:** 12,465,075
162+
- **Base Call Weight:** ref_time=1,560,414,913, proof_size=6,934
163+
- **Total Weight:** ref_time=1,570,958,680, proof_size=6,934
164+
- **Weight Consumed:** ref_time=10,543,767 (0.7% of total), proof_size=0
165165

166166
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
167167
| ----------------- | --------- | ---------- | ------------ | -------- | ---------- | ------------- | --------------- |
@@ -173,10 +173,10 @@ Generated on: 2025-12-19
173173

174174
### Fibonacci_pvm - fib_10
175175

176-
**Total Gas Used:** 352,303
177-
**Base Call Weight:** ref_time=913,100,531, proof_size=8,432
178-
**Total Weight:** ref_time=1,619,349,144, proof_size=11,146
179-
**Weight Consumed:** ref_time=706,248,613 (43.6% of total), proof_size=2,714
176+
- **Total Gas Used:** 352,303
177+
- **Base Call Weight:** ref_time=913,100,531, proof_size=8,432
178+
- **Total Weight:** ref_time=1,619,349,144, proof_size=11,146
179+
- **Weight Consumed:** ref_time=706,248,613 (43.6% of total), proof_size=2,714
180180

181181
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
182182
| ----------------- | --------- | ---------- | ------------ | ---------- | ---------- | ------------- | --------------- |
@@ -189,10 +189,10 @@ Generated on: 2025-12-19
189189

190190
### fibonacci_ink - deploy
191191

192-
**Total Gas Used:** 10,792,216
193-
**Base Call Weight:** ref_time=1,547,200,203, proof_size=6,934
194-
**Total Weight:** ref_time=1,732,998,392, proof_size=17,191
195-
**Weight Consumed:** ref_time=185,798,189 (10.7% of total), proof_size=10,257
192+
- **Total Gas Used:** 10,792,216
193+
- **Base Call Weight:** ref_time=1,547,200,203, proof_size=6,934
194+
- **Total Weight:** ref_time=1,732,998,392, proof_size=17,191
195+
- **Weight Consumed:** ref_time=185,798,189 (10.7% of total), proof_size=10,257
196196

197197
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
198198
| ----------------- | --------- | ---------- | ------------ | ----------- | ---------- | ------------- | --------------- |
@@ -204,10 +204,10 @@ Generated on: 2025-12-19
204204

205205
### fibonacci_ink - fib_10
206206

207-
**Total Gas Used:** 347,176
208-
**Base Call Weight:** ref_time=913,100,531, proof_size=8,432
209-
**Total Weight:** ref_time=1,362,985,528, proof_size=30,825
210-
**Weight Consumed:** ref_time=449,884,997 (33.0% of total), proof_size=22,393
207+
- **Total Gas Used:** 347,176
208+
- **Base Call Weight:** ref_time=913,100,531, proof_size=8,432
209+
- **Total Weight:** ref_time=1,362,985,528, proof_size=30,825
210+
- **Weight Consumed:** ref_time=449,884,997 (33.0% of total), proof_size=22,393
211211

212212
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
213213
| ----------------- | --------- | ---------- | ------------ | ----------- | ---------- | ------------- | --------------- |
@@ -221,10 +221,10 @@ Generated on: 2025-12-19
221221

222222
### fibonacci_rust - fib_10
223223

224-
**Total Gas Used:** 340,383
225-
**Base Call Weight:** ref_time=913,100,531, proof_size=8,432
226-
**Total Weight:** ref_time=1,023,353,284, proof_size=8,979
227-
**Weight Consumed:** ref_time=110,252,753 (10.8% of total), proof_size=547
224+
- **Total Gas Used:** 340,383
225+
- **Base Call Weight:** ref_time=913,100,531, proof_size=8,432
226+
- **Total Weight:** ref_time=1,023,353,284, proof_size=8,979
227+
- **Weight Consumed:** ref_time=110,252,753 (10.8% of total), proof_size=547
228228

229229
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
230230
| -------------- | --------- | ---------- | ------------ | ---------- | ---------- | ------------- | --------------- |
@@ -234,10 +234,10 @@ Generated on: 2025-12-19
234234

235235
### SimpleToken_evm - deploy
236236

237-
**Total Gas Used:** 8,082,983
238-
**Base Call Weight:** ref_time=1,526,768,837, proof_size=6,934
239-
**Total Weight:** ref_time=1,528,362,837, proof_size=6,934
240-
**Weight Consumed:** ref_time=1,594,000 (0.1% of total), proof_size=0
237+
- **Total Gas Used:** 8,082,983
238+
- **Base Call Weight:** ref_time=1,526,768,837, proof_size=6,934
239+
- **Total Weight:** ref_time=1,528,362,837, proof_size=6,934
240+
- **Weight Consumed:** ref_time=1,594,000 (0.1% of total), proof_size=0
241241

242242
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
243243
| --------- | --------- | ---------- | ------------ | -------- | ---------- | ------------- | --------------- |
@@ -257,10 +257,10 @@ Generated on: 2025-12-19
257257

258258
### SimpleToken_evm - mint
259259

260-
**Total Gas Used:** 520,147
261-
**Base Call Weight:** ref_time=913,507,322, proof_size=8,531
262-
**Total Weight:** ref_time=1,431,551,949, proof_size=49,623
263-
**Weight Consumed:** ref_time=518,044,627 (36.2% of total), proof_size=41,092
260+
- **Total Gas Used:** 520,147
261+
- **Base Call Weight:** ref_time=913,507,322, proof_size=8,531
262+
- **Total Weight:** ref_time=1,431,551,949, proof_size=49,623
263+
- **Weight Consumed:** ref_time=518,044,627 (36.2% of total), proof_size=41,092
264264

265265
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
266266
| ------------ | --------- | ---------- | ------------ | ----------- | ---------- | ------------- | --------------- |
@@ -288,10 +288,10 @@ Generated on: 2025-12-19
288288

289289
### SimpleToken_pvm - deploy
290290

291-
**Total Gas Used:** 17,673,493
292-
**Base Call Weight:** ref_time=1,600,407,215, proof_size=6,934
293-
**Total Weight:** ref_time=1,610,852,522, proof_size=6,934
294-
**Weight Consumed:** ref_time=10,445,307 (0.6% of total), proof_size=0
291+
- **Total Gas Used:** 17,673,493
292+
- **Base Call Weight:** ref_time=1,600,407,215, proof_size=6,934
293+
- **Total Weight:** ref_time=1,610,852,522, proof_size=6,934
294+
- **Weight Consumed:** ref_time=10,445,307 (0.6% of total), proof_size=0
295295

296296
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
297297
| ----------------- | --------- | ---------- | ------------ | -------- | ---------- | ------------- | --------------- |
@@ -303,10 +303,10 @@ Generated on: 2025-12-19
303303

304304
### SimpleToken_pvm - mint
305305

306-
**Total Gas Used:** 521,464
307-
**Base Call Weight:** ref_time=913,507,322, proof_size=8,531
308-
**Total Weight:** ref_time=1,497,388,823, proof_size=54,800
309-
**Weight Consumed:** ref_time=583,881,501 (39.0% of total), proof_size=46,269
306+
- **Total Gas Used:** 521,464
307+
- **Base Call Weight:** ref_time=913,507,322, proof_size=8,531
308+
- **Total Weight:** ref_time=1,497,388,823, proof_size=54,800
309+
- **Weight Consumed:** ref_time=583,881,501 (39.0% of total), proof_size=46,269
310310

311311
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
312312
| -------------------- | --------- | ---------- | ------------ | ----------- | ---------- | ------------- | --------------- |
@@ -322,10 +322,10 @@ Generated on: 2025-12-19
322322

323323
### simple_token_ink - deploy
324324

325-
**Total Gas Used:** 24,123,203
326-
**Base Call Weight:** ref_time=1,649,531,119, proof_size=6,934
327-
**Total Weight:** ref_time=1,864,343,762, proof_size=17,191
328-
**Weight Consumed:** ref_time=214,812,643 (11.5% of total), proof_size=10,257
325+
- **Total Gas Used:** 24,123,203
326+
- **Base Call Weight:** ref_time=1,649,531,119, proof_size=6,934
327+
- **Total Weight:** ref_time=1,864,343,762, proof_size=17,191
328+
- **Weight Consumed:** ref_time=214,812,643 (11.5% of total), proof_size=10,257
329329

330330
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
331331
| ----------------- | --------- | ---------- | ------------ | ----------- | ---------- | ------------- | --------------- |
@@ -337,10 +337,10 @@ Generated on: 2025-12-19
337337

338338
### simple_token_ink - mint
339339

340-
**Total Gas Used:** 474,948
341-
**Base Call Weight:** ref_time=913,507,322, proof_size=8,531
342-
**Total Weight:** ref_time=1,731,583,752, proof_size=57,968
343-
**Weight Consumed:** ref_time=818,076,430 (47.2% of total), proof_size=49,437
340+
- **Total Gas Used:** 474,948
341+
- **Base Call Weight:** ref_time=913,507,322, proof_size=8,531
342+
- **Total Weight:** ref_time=1,731,583,752, proof_size=57,968
343+
- **Weight Consumed:** ref_time=818,076,430 (47.2% of total), proof_size=49,437
344344

345345
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
346346
| ----------------- | --------- | ---------- | ------------ | ----------- | ---------- | ------------- | --------------- |
@@ -354,10 +354,10 @@ Generated on: 2025-12-19
354354

355355
### simple_token_no_alloc_rust - mint
356356

357-
**Total Gas Used:** 521,627
358-
**Base Call Weight:** ref_time=913,507,322, proof_size=8,531
359-
**Total Weight:** ref_time=1,505,513,738, proof_size=53,929
360-
**Weight Consumed:** ref_time=592,006,416 (39.3% of total), proof_size=45,398
357+
- **Total Gas Used:** 521,627
358+
- **Base Call Weight:** ref_time=913,507,322, proof_size=8,531
359+
- **Total Weight:** ref_time=1,505,513,738, proof_size=53,929
360+
- **Weight Consumed:** ref_time=592,006,416 (39.3% of total), proof_size=45,398
361361

362362
| Opcode | Total Gas | Call Count | Avg Gas/Call | ref time | proof size | % of ref time | % of proof size |
363363
| --------------- | --------- | ---------- | ------------ | ----------- | ---------- | ------------- | --------------- |

0 commit comments

Comments
 (0)