From 15a2d1b1eaf4d647f90a08c6c995653d12d55c7e Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Tue, 9 Aug 2016 21:45:16 +0200 Subject: [PATCH] Better bench --- programs/bench/src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/programs/bench/src/main.cpp b/programs/bench/src/main.cpp index 729a050d..f788a65e 100644 --- a/programs/bench/src/main.cpp +++ b/programs/bench/src/main.cpp @@ -22,7 +22,7 @@ bool display_result(const char* name, uint64_t duration){ return false; } - uint64_t throughput = 1000 * ((PAGES * 4096) / duration); + uint64_t throughput = 1000 * ((repeat * PAGES * 4096) / duration); if(throughput > (1024 * 1024)){ printf("%s: %ums bandwith: %uMiB/s\n", name, duration, throughput / (1024 * 1024)); @@ -41,6 +41,8 @@ int main(){ char* buffer_one = new char[PAGES * 4096]; char* buffer_two = new char[PAGES * 4096]; + printf("Start benchmark...\n"); + uint64_t start = 0, end = 0; while(repeat < 100){