diff options
author | Burt P <pburt0@gmail.com> | 2018-10-24 16:00:03 -0500 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2018-11-30 05:00:21 -0800 |
commit | bd3b14dd05b0b7fadf26363cd1424a3e22f7be6a (patch) | |
tree | d4bf14327f9fb4d3dc0e8a75a0de06cd3a7957b4 /hardinfo/util.c | |
parent | 5c32c60b3b4bb92fbfd5dd8c465c1f38f063660a (diff) |
add hardinfo param for maximum number of benchmark results to include
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'hardinfo/util.c')
-rw-r--r-- | hardinfo/util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hardinfo/util.c b/hardinfo/util.c index 4acb28be..67e5b663 100644 --- a/hardinfo/util.c +++ b/hardinfo/util.c @@ -394,6 +394,7 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) static gchar *run_benchmark = NULL; static gchar *result_format = NULL; static gchar **use_modules = NULL; + static gint max_bench_results = 10; static GOptionEntry options[] = { { @@ -421,6 +422,12 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) .arg_data = &result_format, .description = N_("benchmark result format ([short], conf, shell)")}, { + .long_name = "max-results", + .short_name = 'n', + .arg = G_OPTION_ARG_INT, + .arg_data = &max_bench_results, + .description = N_("maximum number of benchmark results to include (-1 for no limit, default is 10)")}, + { .long_name = "list-modules", .short_name = 'l', .arg = G_OPTION_ARG_NONE, @@ -490,6 +497,7 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) param->use_modules = use_modules; param->run_benchmark = run_benchmark; param->result_format = result_format; + param->max_bench_results = max_bench_results; param->autoload_deps = autoload_deps; param->run_xmlrpc_server = run_xmlrpc_server; param->skip_benchmarks = skip_benchmarks; |