diff --git a/tools/load_tester.cpp b/tools/load_tester.cpp index c55470e..16f2fd6 100644 --- a/tools/load_tester.cpp +++ b/tools/load_tester.cpp @@ -772,15 +772,13 @@ int main(int argc, char *argv[]) { double startTime = now(); for (double prevTime = startTime, - prevConnections = connectionId.load(std::memory_order_relaxed); + prevRequests = g_total_requests.load(std::memory_order_relaxed); !g_shutdown.load(std::memory_order_relaxed);) { sleep(g_config.stats_interval); double currTime = now(); - double currConnections = connectionId.load(std::memory_order_relaxed); - double throughput = (currConnections - prevConnections) / - (currTime - prevTime) * - g_config.requests_per_connection; + double currRequests = g_total_requests.load(std::memory_order_relaxed); + double throughput = (currRequests - prevRequests) / (currTime - prevTime); // Get latency statistics uint64_t total_requests = g_total_requests.load(std::memory_order_relaxed); @@ -807,7 +805,7 @@ int main(int argc, char *argv[]) { } prevTime = currTime; - prevConnections = currConnections; + prevRequests = currRequests; } for (auto &thread : threads) {