@@ -136,12 +136,12 @@ func (t *Task) Execute(ctx context.Context) error {
136136 t .config .StartingTPS , t .config .EndingTPS , t .config .IncrementTPS )
137137
138138 for sendingTps := t .config .StartingTPS ; sendingTps <= t .config .EndingTPS ; sendingTps += t .config .IncrementTPS {
139-
140139 // measure the throughput with the current sendingTps
141140 processedTps , err := t .measureTpsWithLoad (loadTarget , sendingTps , t .config .DurationS , percentile , singleMeasureDeadline )
142141 if err != nil {
143142 t .logger .Errorf ("Error during throughput measurement with sendingTps=%d, duration=%d: %v" , sendingTps , t .config .DurationS , err )
144143 t .ctx .SetResult (types .TaskResultFailure )
144+
145145 return err
146146 }
147147
@@ -173,7 +173,6 @@ func (t *Task) Execute(ctx context.Context) error {
173173
174174func (t * Task ) measureTpsWithLoad (loadTarget * txloadtool.LoadTarget , sendingTps int , durationS int , percentile float64 ,
175175 testDeadline time.Time ) (int , error ) {
176-
177176 t .logger .Infof ("Single measure of throughput, sending TPS: %d, duration: %d secs" , sendingTps , durationS )
178177
179178 // Prepare to collect transaction latencies
@@ -225,11 +224,11 @@ func (t *Task) measureTpsWithLoad(loadTarget *txloadtool.LoadTarget, sendingTps
225224 // Calculate statistics
226225 t .logger .Infof ("Last measure delay since start time: %s" , result .LastMeasureDelay )
227226
228- processedTps_f := float64 (result .TotalTxs ) / result .LastMeasureDelay .Seconds ()
229- processedTps := int (processedTps_f ) // round
227+ processedTpsF := float64 (result .TotalTxs ) / result .LastMeasureDelay .Seconds ()
228+ processedTps := int (processedTpsF ) // round
230229
231230 t .logger .Infof ("Processed %d transactions in %.2fs, mean throughput: %.2f tx/s" ,
232- result .TotalTxs , result .LastMeasureDelay .Seconds (), processedTps_f )
231+ result .TotalTxs , result .LastMeasureDelay .Seconds (), processedTpsF )
233232 t .logger .Infof ("Sent %d transactions in %.2fs" , result .TotalTxs , result .LastMeasureDelay .Seconds ())
234233
235234 return processedTps , nil
0 commit comments