Fix issue to generate graph without any repetition

This commit is contained in:
Patrick Pelissier committed 2023-04-08 11:25:05 +02:00
1 parent da3e71c676
commit b8a9073fc9
1 file changed
+3 -1
+3 -1
View File
@@ -235,7 +235,7 @@ test(const char library[], size_t n, const config_func_t functions[], int argc,
sprintf(filename, "plot-%s-%d.dat", library, arg.test_function);
graph_file = fopen(filename, "wt");
if (!graph_file) {
fprintf(stderr, "ERROR: Cannot create plot.dat\n");
fprintf(stderr, "ERROR: Cannot create the file '%s'\n", filename);
exit(-2);
}
fprintf(graph_file, "# plotting %s-%d : %s\n# N T", library, arg.test_function, functions[i].funcname);
@@ -271,6 +271,8 @@ test(const char library[], size_t n, const config_func_t functions[], int argc,
avg /= arg.repeat;
variance = (variance - arg.repeat * avg * avg) / (arg.repeat - 1);
ba = get_best_within(arg.repeat, measure, 1. + arg.within);
} else {
ba = avg;
}
// The average value shall be around best_within (and greater)