From 2a0f584c77efe466f0e6e7a7d056bffbc297e032 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 23 Sep 2024 11:35:22 +0200 Subject: add a simple read benchmark. No AVX or anything. --- mbw.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'mbw.c') diff --git a/mbw.c b/mbw.c index 85eff8a..91d94fc 100644 --- a/mbw.c +++ b/mbw.c @@ -32,7 +32,7 @@ #define DEFAULT_NR_LOOPS 40 /* we have 4 tests at the moment */ -#define MAX_TESTS 4 +#define MAX_TESTS 5 /* default block size for test 2, in bytes */ #define DEFAULT_BLOCK_SIZE 262144 @@ -42,6 +42,7 @@ #define TEST_DUMB 1 #define TEST_MCBLOCK 2 #define TEST_AVX512 3 +#define TEST_READ_DUMB 4 /* version number */ #define VERSION "1.5+smaug" @@ -345,6 +346,7 @@ void usage() #ifdef HAVE_AVX512 printf(" -t%d: AVX512 copy test\n", TEST_AVX512); #endif + printf(" -t%d: dumbp read test\n", TEST_READ_DUMB); printf(" -b : block size in bytes for -t2 (default: %d)\n", DEFAULT_BLOCK_SIZE); printf(" -q: quiet (print statistics only)\n"); #ifdef NUMA @@ -421,6 +423,12 @@ void *thread_worker(void *arg) } else if(test_type==TEST_AVX512) { rte_memcpy(arr_b, arr_a, array_bytes); #endif // HAVE_AVX512 + } else if(test_type==TEST_READ_DUMB) { + long tmp = 0; + for(t=dumb_start; t