From ac94b73c7adc04c524409dd41fbb49ea9db80650 Mon Sep 17 00:00:00 2001 From: James Muir Date: Tue, 28 Jan 2025 00:23:01 -0500 Subject: [PATCH] Update configuration/options summary in svg Some of the comments summarizing the configuration/options could be confusing. E.g., "f" was used for "Filtering", but "-f" is the command-line option used to specify the sample frequency. Also, "hz" was used but there is no command-line option or config directive that mentions "hertz". Change the summmary to use the names from the config file. Update the sample config file so it is more obvious what is parsed as a float, and also include "Cmdline", which was missing. --- src/bootchart.conf | 11 ++++++----- src/svg.c | 25 +++++++++++++++++-------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/bootchart.conf b/src/bootchart.conf index 4f5e509..030a2a1 100644 --- a/src/bootchart.conf +++ b/src/bootchart.conf @@ -13,14 +13,15 @@ [Bootchart] #Samples=500 -#Frequency=25 +#Frequency=25.0 #Relative=no #Filter=yes -#Output= -#Init=/path/to/init-binary +#Output= +#Init= #PlotMemoryUsage=no #PlotEntropyGraph=no -#ScaleX=100 -#ScaleY=20 +#ScaleX=100.0 +#ScaleY=20.0 #ControlGroup=no #PerCPU=no +#Cmdline=no diff --git a/src/svg.c b/src/svg.c index 7f3e505..9183de4 100644 --- a/src/svg.c +++ b/src/svg.c @@ -105,14 +105,23 @@ static void svg_header(FILE *of, struct list_sample_data *head, double graph_sta fprintf(of, "\n"); fprintf(of, "\n"); fprintf(of, "\n"); - fprintf(of, "\n\n"); - - fprintf(of, "\n", VERSION); - fprintf(of, "\n", arg_hz, arg_samples_len); - fprintf(of, "\n", arg_scale_x, arg_scale_y); - fprintf(of, "\n", arg_relative, arg_filter); - fprintf(of, "\n", arg_pss, arg_entropy); - fprintf(of, "\n\n", arg_output_path, arg_init_path); + fprintf(of, "\n\n"); + + fprintf(of, "\n\n", VERSION); + + fprintf(of, "\n", arg_samples_len); + fprintf(of, "\n", arg_hz); + fprintf(of, "\n", arg_relative); + fprintf(of, "\n", arg_filter); + fprintf(of, "\n", arg_output_path); + fprintf(of, "\n", arg_init_path); + fprintf(of, "\n", arg_pss); + fprintf(of, "\n", arg_entropy); + fprintf(of, "\n", arg_scale_x); + fprintf(of, "\n", arg_scale_y); + fprintf(of, "\n", arg_show_cgroup); + fprintf(of, "\n", arg_percpu); + fprintf(of, "\n\n", arg_show_cmdline); /* style sheet */ fprintf(of, "\n