Skip to content

Commit fa5d521

Browse files
refactor(tx_pool_throughput_analysis): rename percentage metrics to rate for improved clarity
1 parent 05798c3 commit fa5d521

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

pkg/coordinator/tasks/tx_pool_throughput_analysis/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ The `tx_pool_throughput_analysis` task evaluates the throughput of transaction p
3636
- **`coordinated_omission_event_count`**:
3737
The total count of coordinated omission events across all measurements.
3838

39-
- **`missed_p2p_event_count_percentage`**:
39+
- **`missed_p2p_event_rate`**:
4040
The percentage of transactions that missed P2P events.
4141

42-
- **`coordinated_omission_event_count_percentage`**:
42+
- **`coordinated_omission_event_rate`**:
4343
The percentage of transactions with coordinated omission events.
4444

4545
- **`starting_tps`**:

pkg/coordinator/tasks/tx_pool_throughput_analysis/task.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,20 +177,20 @@ func (t *Task) Execute(ctx context.Context) error {
177177
t.ctx.Outputs.SetVar("increment_tps", t.config.IncrementTPS)
178178
t.ctx.Outputs.SetVar("duration_s", t.config.DurationS)
179179
t.ctx.Outputs.SetVar("total_sent_tx", totalSentTx)
180-
t.ctx.Outputs.SetVar("missed_p2p_event_count_percentage", float64(missedP2PEventCount)/float64(totalSentTx))
181-
t.ctx.Outputs.SetVar("coordinated_omission_event_count_percentage", float64(totalCoordinatedOmissionEventCount)/float64(totalSentTx))
180+
t.ctx.Outputs.SetVar("missed_p2p_event_rate", float64(missedP2PEventCount)/float64(totalSentTx))
181+
t.ctx.Outputs.SetVar("coordinated_omission_event_rate", float64(totalCoordinatedOmissionEventCount)/float64(totalSentTx))
182182

183183
outputs := map[string]interface{}{
184-
"throughput_measures": throughoutMeasures,
185-
"missed_p2p_event_count": missedP2PEventCount,
186-
"coordinated_omission_event_count": totalCoordinatedOmissionEventCount,
187-
"starting_tps": t.config.StartingTPS,
188-
"ending_tps": t.config.EndingTPS,
189-
"increment_tps": t.config.IncrementTPS,
190-
"duration_s": t.config.DurationS,
191-
"total_sent_tx": totalSentTx,
192-
"missed_p2p_event_count_percentage": float64(missedP2PEventCount) / float64(totalSentTx),
193-
"coordinated_omission_event_count_percentage": float64(totalCoordinatedOmissionEventCount) / float64(totalSentTx),
184+
"throughput_measures": throughoutMeasures,
185+
"missed_p2p_event_count": missedP2PEventCount,
186+
"coordinated_omission_event_count": totalCoordinatedOmissionEventCount,
187+
"starting_tps": t.config.StartingTPS,
188+
"ending_tps": t.config.EndingTPS,
189+
"increment_tps": t.config.IncrementTPS,
190+
"duration_s": t.config.DurationS,
191+
"total_sent_tx": totalSentTx,
192+
"missed_p2p_event_rate": float64(missedP2PEventCount) / float64(totalSentTx),
193+
"coordinated_omission_event_rate": float64(totalCoordinatedOmissionEventCount) / float64(totalSentTx),
194194
}
195195

196196
outputsJSON, _ := json.Marshal(outputs)

0 commit comments

Comments
 (0)