diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2023-04-28 10:31:19 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2023-04-28 10:31:19 +0200 |
commit | 490dc079c0374ee2a290a06c42e6ad7e9ca1fa22 (patch) | |
tree | 184ea7383c065c00822d8a0e48c4c03b11a27346 /mbw.c | |
parent | 210cf79cdddda090c5ed45e29b32efee73c50494 (diff) |
produce dfatool-compatible output, add run script
Diffstat (limited to 'mbw.c')
-rw-r--r-- | mbw.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -14,7 +14,7 @@ #include <unistd.h> /* how many runs to average by default */ -#define DEFAULT_NR_LOOPS 10 +#define DEFAULT_NR_LOOPS 40 /* we have 3 tests at the moment */ #define MAX_TESTS 3 @@ -28,7 +28,7 @@ #define TEST_MCBLOCK 2 /* version number */ -#define VERSION "1.5" +#define VERSION "1.5+smaug" /* * MBW memory bandwidth benchmark @@ -151,18 +151,16 @@ void printout(double te, double mt, int type) { switch(type) { case TEST_MEMCPY: - printf("Method: MEMCPY\t"); + printf("e_method=MEMCPY "); break; case TEST_DUMB: - printf("Method: DUMB\t"); + printf("e_method=DUMB "); break; case TEST_MCBLOCK: - printf("Method: MCBLOCK\t"); + printf("e_method=MCBLOCK "); break; } - printf("Elapsed: %.5f\t", te); - printf("MiB: %.5f\t", mt); - printf("Copy: %.3f MiB/s\n", mt/te); + printf("| bandwidth_MiBps=%f\n", mt/te); return; } @@ -287,7 +285,7 @@ int main(int argc, char **argv) for (i=0; nr_loops==0 || i<nr_loops; i++) { te=worker(asize, a, b, testno, block_size); te_sum+=te; - printf("%d\t", i); + printf("[::] block_size_B=%llu array_size_B=%llu ", block_size, asize*long_size); printout(te, mt, testno); } if(showavg) { |