diff --git a/benchmarks/free_list_allocator.cpp b/benchmarks/free_list_allocator.cpp index 2ded58ce..22a8bb7c 100644 --- a/benchmarks/free_list_allocator.cpp +++ b/benchmarks/free_list_allocator.cpp @@ -36,6 +36,7 @@ void benchmark_linux_scalability() std::cout << "Linux Scalability:" << std::endl; std::cout << "Time: " << (end - start) / 1e9 << " sec" << std::endl; std::cout << "Throughput: " << 2 * N / ((end - start) / 1e9) << " ops/s" << std::endl; + std::cout << "Time per operation: " << (end - start) / (2 * N) << " ns" << std::endl; delete[] handles; delete[] buffer; @@ -76,6 +77,7 @@ void benchmark_threadtest() std::cout << "Threadtest:" << std::endl; std::cout << "Time: " << (end - start) / 1e9 << " sec" << std::endl; std::cout << "Throughput: " << 2 * N * M / ((end - start) / 1e9) << " ops/s" << std::endl; + std::cout << "Time per operation: " << (end - start) / (2 * N * M) << " ns" << std::endl; delete[] handles; } @@ -129,6 +131,7 @@ void benchmark_larson() std::cout << "Larson benchmark:" << std::endl; std::cout << "Time: " << (end - start) / 1e9 << " sec" << std::endl; std::cout << "Throughput: " << (N * 2 - M) / ((end - start) / 1e9) << " ops/s" << std::endl; + std::cout << "Time per operation: " << (end - start) / (2 * N - M) << " ns" << std::endl; delete[] handles; } diff --git a/benchmarks/pool_allocator.cpp b/benchmarks/pool_allocator.cpp index f327cf4e..6dd2df38 100644 --- a/benchmarks/pool_allocator.cpp +++ b/benchmarks/pool_allocator.cpp @@ -31,6 +31,7 @@ void benchmark_linux_scalability() std::cout << "Linux Scalability:" << std::endl; std::cout << "Time: " << (end - start) / 1e9 << " sec" << std::endl; std::cout << "Throughput: " << 2 * N / ((end - start) / 1e9) << " ops/s" << std::endl; + std::cout << "Time per operation: " << (end - start) / (2 * N) << " ns" << std::endl; delete[] handles; delete[] buffer;