Skip to content

Commit 65c3927

Browse files
jamuirkeszybz
authored andcommitted
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.
1 parent d0af000 commit 65c3927

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

src/bootchart.conf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313

1414
[Bootchart]
1515
#Samples=500
16-
#Frequency=25
16+
#Frequency=25.0
1717
#Relative=no
1818
#Filter=yes
19-
#Output=<folder name, defaults to /run/log>
20-
#Init=/path/to/init-binary
19+
#Output=<directory name, defaults to /run/log>
20+
#Init=<path to init, defaults to the systemd binary>
2121
#PlotMemoryUsage=no
2222
#PlotEntropyGraph=no
23-
#ScaleX=100
24-
#ScaleY=20
23+
#ScaleX=100.0
24+
#ScaleY=20.0
2525
#ControlGroup=no
2626
#PerCPU=no
27+
#Cmdline=no

src/svg.c

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,23 @@ static void svg_header(FILE *of, struct list_sample_data *head, double graph_sta
105105
fprintf(of, "<!-- such as Chrome, Chromium, or Firefox. Other applications that -->\n");
106106
fprintf(of, "<!-- render these files properly but more slowly are ImageMagick, gimp, -->\n");
107107
fprintf(of, "<!-- inkscape, etc. To display the files on your system, just point -->\n");
108-
fprintf(of, "<!-- your browser to file:///run/log/ and click. This bootchart was -->\n\n");
109-
110-
fprintf(of, "<!-- generated by bootchart version %s, running with options: -->\n", VERSION);
111-
fprintf(of, "<!-- hz=\"%f\" n=\"%d\" -->\n", arg_hz, arg_samples_len);
112-
fprintf(of, "<!-- x=\"%f\" y=\"%f\" -->\n", arg_scale_x, arg_scale_y);
113-
fprintf(of, "<!-- rel=\"%d\" f=\"%d\" -->\n", arg_relative, arg_filter);
114-
fprintf(of, "<!-- p=\"%d\" e=\"%d\" -->\n", arg_pss, arg_entropy);
115-
fprintf(of, "<!-- o=\"%s\" i=\"%s\" -->\n\n", arg_output_path, arg_init_path);
108+
fprintf(of, "<!-- your browser to file:///run/log (the default location) and click. -->\n\n");
109+
110+
fprintf(of, "<!-- This file was generated by bootchart version %s, running with configuration: -->\n\n", VERSION);
111+
112+
fprintf(of, "<!-- Samples=%d -->\n", arg_samples_len);
113+
fprintf(of, "<!-- Frequency=%f -->\n", arg_hz);
114+
fprintf(of, "<!-- Relative=%d -->\n", arg_relative);
115+
fprintf(of, "<!-- Filter=%d -->\n", arg_filter);
116+
fprintf(of, "<!-- Output=%s -->\n", arg_output_path);
117+
fprintf(of, "<!-- Init=%s -->\n", arg_init_path);
118+
fprintf(of, "<!-- PlotMemoryUsage=%d -->\n", arg_pss);
119+
fprintf(of, "<!-- PlotEntropyGraph=%d -->\n", arg_entropy);
120+
fprintf(of, "<!-- ScaleX=%f -->\n", arg_scale_x);
121+
fprintf(of, "<!-- ScaleY=%f -->\n", arg_scale_y);
122+
fprintf(of, "<!-- ControlGroup=%d -->\n", arg_show_cgroup);
123+
fprintf(of, "<!-- PerCPU=%d -->\n", arg_percpu);
124+
fprintf(of, "<!-- Cmdline=%d -->\n\n", arg_show_cmdline);
116125

117126
/* style sheet */
118127
fprintf(of, "<defs>\n <style type=\"text/css\">\n <![CDATA[\n");

0 commit comments

Comments
 (0)