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 --- includes/benchmark.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'includes/benchmark.h') diff --git a/includes/benchmark.h b/includes/benchmark.h index 04182944..8af3739b 100644 --- a/includes/benchmark.h +++ b/includes/benchmark.h @@ -2,6 +2,7 @@ #define __BENCHMARK_H__ #include "hardinfo.h" +#include "util_sysobj.h" /* for SEQ() */ extern ProgramParameters params; @@ -37,6 +38,7 @@ typedef struct { int threads_used; int revision; char extra[256]; /* no \n, ; or | */ + char user_note[256]; /* no \n, ; or | */ } bench_value; #define EMPTY_BENCH_VALUE {-1.0f,0,0,-1,""} @@ -58,4 +60,12 @@ bench_value benchmark_crunch_for(float seconds, gint n_threads, extern bench_value bench_results[BENCHMARK_N_ENTRIES]; +/* in bench_util.c */ + +/* guarantee a minimum size of data + * or return null */ +gchar *get_test_data(gsize min_size); +char *md5_digest_str(const char *data, unsigned int len); +#define bench_msg(msg, ...) fprintf (stderr, "[%s] " msg "\n", __FUNCTION__, ##__VA_ARGS__) + #endif /* __BENCHMARK_H__ */ -- cgit v1.2.3