diff --git a/pkg/client/output.go b/pkg/client/output.go index 6d88c0f..a480502 100644 --- a/pkg/client/output.go +++ b/pkg/client/output.go @@ -11,9 +11,12 @@ func WriteOutputToFile(outputFilePath string, responseCount []ResponseCount) err return err } defer file.Close() + sum := 0.0 for _, count := range responseCount { throughput := float64(count.readOperations + count.writeOperations) + sum += throughput file.WriteString(fmt.Sprintf("Throughput: %f\n", throughput)) } + file.WriteString(fmt.Sprintf("Average Throughput: %f\n", sum/float64(len(responseCount)))) return nil }