Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document what vertical dashed line in SVG means #39

Open
paulmenzel opened this issue Mar 20, 2018 · 1 comment
Open

Document what vertical dashed line in SVG means #39

paulmenzel opened this issue Mar 20, 2018 · 1 comment

Comments

@paulmenzel
Copy link

[Moved from https://github.com/systemd/systemd/issues/8502.]

Submission type

  • Request for enhancement (RFE)

systemd version the issue has been seen with

238

Used distribution

Debian Sid/unstable

In case of bug report: Expected behaviour you didn't see

An explanation, what the vertical dashed line in the SVG means.

In case of bug report: Unexpected behaviour you saw

No explanation.

In case of bug report: Steps to reproduce the problem

Start system with init=/lib/systemd/systemd-bootchart.

@jamuir
Copy link

jamuir commented Jan 22, 2025

There is an explanation in the code that mentions Intel Atom processors:

systemd-bootchart/src/svg.c

Lines 1208 to 1233 in a15bcaf

/*
* our definition of "idle":
*
* if for (hz / 2) we've used less CPU than (interval / 2) ...
* defaults to 4.0%, which experimentally, is where atom idles
*/
if ((crt - brt) < (interval / 2.0)) {
idletime = ps->sample->sampledata->sampletime - graph_start;
fprintf(of, "\n<!-- idle detected at %.03f seconds -->\n", idletime);
fprintf(of, "<line class=\"idle\" x1=\"%.03f\" y1=\"%.03f\" x2=\"%.03f\" y2=\"%.03f\" />\n",
time_to_graph(idletime),
-arg_scale_y,
time_to_graph(idletime),
ps_to_graph(pcount) + arg_scale_y);
if (idletime > 1.0)
fprintf(of, "<text class=\"idle\" x=\"%.03f\" y=\"%.03f\">%.01fs</text>\n",
time_to_graph(idletime) + 5.0,
ps_to_graph(pcount) + arg_scale_y,
idletime);
else
fprintf(of, "<text class=\"idle\" x=\"%.03f\" y=\"%.03f\">%.01fms</text>\n",
time_to_graph(idletime) + 5.0,
ps_to_graph(pcount) + arg_scale_y,
to_ms(idletime));
break;
}

I agree that this should be documented.

Could you open a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants