|
18 | 18 | DEFAULT_EXEC_NETHERMIND = '../../../gas-cost-estimator-clients/build/nethermind/Nethermind.Benchmark.Runner'
|
19 | 19 | DEFAULT_EXEC_ERIGON = '../../../gas-cost-estimator-clients/build/erigon/evm'
|
20 | 20 | DEFAULT_EXEC_REVM = '../../../gas-cost-estimator-clients/build/revm/revme'
|
21 |
| -DEFAULT_EXEC_ETHERJS = '../../../gas-cost-estimator-clients/ethereumjs-monorepo/packages/vm/benchmarks/run.js' |
| 21 | +DEFAULT_EXEC_ETHERJS = '../../../gas-cost-estimator-clients/build/ethereumjs/index.js' |
22 | 22 | DEFAULT_EXEC_BESU = '../../../gas-cost-estimator-clients/build/besu/evmtool/bin/evmtool'
|
23 | 23 |
|
24 | 24 |
|
@@ -111,11 +111,7 @@ def measure(self, sample_size=1, evm="evmone", input_file="", exec_path=""):
|
111 | 111 | header = "program_id,sample_id,total_time_ns,iterations_count"
|
112 | 112 | elif evm == nethermind:
|
113 | 113 | header = "program_id,sample_id,total_time_ns,iterations_count,std_dev_time_ns,mem_allocs,mem_alloc_bytes"
|
114 |
| - elif evm == ethereumjs: |
115 |
| - header = "program_id,sample_id,total_time_ns,iterations_count,margin_of_error" |
116 |
| - elif evm == revm: |
117 |
| - header = "program_id,sample_id,total_time_ns,iterations_count,std_dev_time_ns" |
118 |
| - elif evm == besu: |
| 114 | + elif evm == ethereumjs or evm == revm or evm == besu: |
119 | 115 | header = "program_id,sample_id,total_time_ns,iterations_count,std_dev_time_ns"
|
120 | 116 | print(header)
|
121 | 117 |
|
@@ -295,8 +291,14 @@ def run_ethereumjs_benchmark(self, program, sample_size, exec_path):
|
295 | 291 | line_id = 1
|
296 | 292 | for line in raw_result:
|
297 | 293 | line_values = line.split(',')
|
| 294 | + |
| 295 | + if line_values[4].startswith('±') and line_values[4].endswith('%'): |
| 296 | + std_dev_ns = (float(line_values[4][1:-1]) * float(line_values[3])) / 100 |
| 297 | + else : |
| 298 | + std_dev_ns = line_values[4] |
| 299 | + |
298 | 300 | instrumenter_result.append(
|
299 |
| - f'{line_id},{line_values[3]},{line_values[5]},{line_values[4]}') |
| 301 | + f'{line_id},{line_values[3]},{line_values[5]},{std_dev_ns}') |
300 | 302 | line_id += 1
|
301 | 303 | return instrumenter_result
|
302 | 304 |
|
|
0 commit comments