@@ -27,10 +27,12 @@ var (
2727)
2828
2929type ThroughoutMeasure struct {
30- LoadTPS int `json:"load_tps"`
31- ProcessedTPS int `json:"processed_tps"`
32- NotReceivedP2PEventCount int `json:"not_received_p2p_event_count"`
33- CoordinatedOmissionEventCount int `json:"coordinated_omission_event_count"`
30+ LoadTPS int `json:"load_tps"`
31+ ProcessedTPS int `json:"processed_tps"`
32+ NotReceivedP2PEventCount int `json:"not_received_p2p_event_count"`
33+ NotReceivedP2PEventRate float64 `json:"not_received_p2p_event_rate"`
34+ CoordinatedOmissionEventCount int `json:"coordinated_omission_event_count"`
35+ CoordinatedOmissionEventRate float64 `json:"coordinated_omission_event_rate"`
3436}
3537
3638type Task struct {
@@ -152,15 +154,19 @@ func (t *Task) Execute(ctx context.Context) error {
152154 return err
153155 }
154156
157+ partialSentTx := sendingTps * t .config .DurationS
158+
155159 // add to throughoutMeasures
156160 throughoutMeasures = append (throughoutMeasures , ThroughoutMeasure {
157161 LoadTPS : sendingTps ,
158162 ProcessedTPS : processedTps ,
159163 NotReceivedP2PEventCount : notReceivedP2PEventCount ,
164+ NotReceivedP2PEventRate : float64 (notReceivedP2PEventCount ) / float64 (partialSentTx ),
160165 CoordinatedOmissionEventCount : coordinatedOmissionEventCount ,
166+ CoordinatedOmissionEventRate : float64 (coordinatedOmissionEventCount ) / float64 (partialSentTx ),
161167 })
162168
163- totalSentTx += sendingTps * t . config . DurationS
169+ totalSentTx += partialSentTx
164170 missedP2PEventCount += notReceivedP2PEventCount
165171 totalCoordinatedOmissionEventCount += coordinatedOmissionEventCount
166172 }
0 commit comments