@@ -140,6 +140,7 @@ func (t *Task) Execute(ctx context.Context) error {
140140 t .logger .Infof ("Iterating over the TPS range, starting TPS: %d, ending TPS: %d, increment TPS: %d" ,
141141 t .config .StartingTPS , t .config .EndingTPS , t .config .IncrementTPS )
142142
143+ maxTps := 0
143144 totalSentTx := 0
144145 missedP2PEventCount := 0
145146 totalCoordinatedOmissionEventCount := 0
@@ -166,6 +167,10 @@ func (t *Task) Execute(ctx context.Context) error {
166167 CoordinatedOmissionEventRate : float64 (coordinatedOmissionEventCount ) / float64 (partialSentTx ),
167168 })
168169
170+ if processedTps > maxTps {
171+ maxTps = processedTps
172+ }
173+
169174 totalSentTx += partialSentTx
170175 missedP2PEventCount += notReceivedP2PEventCount
171176 totalCoordinatedOmissionEventCount += coordinatedOmissionEventCount
@@ -185,6 +190,7 @@ func (t *Task) Execute(ctx context.Context) error {
185190 t .ctx .Outputs .SetVar ("total_sent_tx" , totalSentTx )
186191 t .ctx .Outputs .SetVar ("missed_p2p_event_rate" , float64 (missedP2PEventCount )/ float64 (totalSentTx ))
187192 t .ctx .Outputs .SetVar ("coordinated_omission_event_rate" , float64 (totalCoordinatedOmissionEventCount )/ float64 (totalSentTx ))
193+ t .ctx .Outputs .SetVar ("max_tps" , maxTps )
188194
189195 outputs := map [string ]interface {}{
190196 "throughput_measures" : throughoutMeasures ,
@@ -197,6 +203,7 @@ func (t *Task) Execute(ctx context.Context) error {
197203 "total_sent_tx" : totalSentTx ,
198204 "missed_p2p_event_rate" : float64 (missedP2PEventCount ) / float64 (totalSentTx ),
199205 "coordinated_omission_event_rate" : float64 (totalCoordinatedOmissionEventCount ) / float64 (totalSentTx ),
206+ "max_tps" : maxTps ,
200207 }
201208
202209 outputsJSON , _ := json .Marshal (outputs )
0 commit comments