Skip to content
This repository was archived by the owner on Feb 8, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions perf-metrics/src/dashboard/opcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ impl OpcodeStat {
}

// Return (total_gas, static_gas, dyn_gas).
fn caculate_gas(opcode: u8, count: u64, total_gas: i128) -> (f64, u64, f64) {
fn calculate_gas(opcode: u8, count: u64, total_gas: i128) -> (f64, u64, f64) {
let (base_gas, is_static) = match MERGE_MAP[opcode as usize] {
Some(opcode_info) => (opcode_info.1.gas, opcode_info.1.static_gas),
None => return (0.0, 0, 0.0),
Expand Down Expand Up @@ -1433,7 +1433,7 @@ impl From<&OpcodeRecord> for OpcodeStats {
opcode_stat.count = v.0;
opcode_stat.time = v.1;
opcode_stat.avg_cost = convert_cycles_to_ns_f64(v.1) / v.0 as f64;
let (op_total, op_static, op_dyn) = caculate_gas(op, v.0, v.2);
let (op_total, op_static, op_dyn) = calculate_gas(op, v.0, v.2);
opcode_stat.mgas = op_total / MGAS_TO_GAS as f64;
opcode_stat.static_gas = Some(op_static);
opcode_stat.dyn_gas = Some(op_dyn);
Expand Down
2 changes: 1 addition & 1 deletion perf-metrics/src/metrics/metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub enum MetricEvent {
ExecutionStageTime {
/// Current block_number.
block_number: u64,
/// excution duration record.
/// execution duration record.
record: ExecutionDurationRecord,
},
/// Amount of txs and gas in a block.
Expand Down