From d17909c82b03ad0427a285c66766421751546c42 Mon Sep 17 00:00:00 2001 From: Burt P Date: Sat, 10 Aug 2019 23:11:21 -0500 Subject: Benchmark: fixes, user_note, verifiable test data * fix zlib display order * fix cryptohash MiB/s calculation * revision and params for other benchmarks * allow attaching user note to bench result with -u * don't inlcude the new result value bits if they are empty/invalid in bench_value_to_str(). bench_value_from_str() doesn't need to be modified. * bench_results: clean old result cpu name for x86 * use problem_marker() from dmi_memory to mark old version bench results * benchmark: verifiable test data size and content - The test data benchmark.data is stored in a file that could be edited to change the size or content. /* to guarantee size */ gchar *get_test_data(gsize min_size); /* to checksum content */ char *md5_digest_str(const char *data, unsigned int len); Signed-off-by: Burt P --- modules/benchmark/fft.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'modules/benchmark/fft.c') diff --git a/modules/benchmark/fft.c b/modules/benchmark/fft.c index caa52d3d..b4bff39b 100644 --- a/modules/benchmark/fft.c +++ b/modules/benchmark/fft.c @@ -20,6 +20,10 @@ #include "benchmark.h" #include "fftbench.h" +/* if anything changes in this block, increment revision */ +#define BENCH_REVISION -1 +#define FFT_MAXT 4 + static gpointer fft_for(unsigned int start, unsigned int end, void *data, gint thread_number) { unsigned int i; @@ -33,8 +37,6 @@ static gpointer fft_for(unsigned int start, unsigned int end, void *data, gint t return NULL; } -#define FFT_MAXT 4 - void benchmark_fft(void) { @@ -50,7 +52,7 @@ benchmark_fft(void) /* Pre-allocate all benchmarks */ benches = g_new0(FFTBench *, FFT_MAXT); for (i = 0; i < FFT_MAXT; i++) { - benches[i] = fft_bench_new(); + benches[i] = fft_bench_new(); } /* Run the benchmark */ @@ -58,10 +60,11 @@ benchmark_fft(void) /* Free up the memory */ for (i = 0; i < FFT_MAXT; i++) { - fft_bench_free(benches[i]); + fft_bench_free(benches[i]); } g_free(benches); r.result = r.elapsed_time; + r.revision = BENCH_REVISION; bench_results[BENCHMARK_FFT] = r; } -- cgit v1.2.3