Bug 70752 - systemd-analyze: SVG output has wrong label positions/directions
Summary: systemd-analyze: SVG output has wrong label positions/directions
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-22 08:30 UTC by Jean Delvare
Modified: 2013-11-04 08:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jean Delvare 2013-10-22 08:30:43 UTC
With systemd version 195, "systemd-analyze plot" would put the label inside the bar for the top portion of the chart, and at the left of the bar for the bottom portion of the chart.

With systemd version 207, it's the other way around. "systemd-analyze plot" puts the label at the left of the bar for the top portion of the chart, and inside the bar (but mostly at the right of the bar, as last bars are always short) for the bottom portion of the chart.

Was this change on purpose? I wasn't necessarily a big fan of the original layout, but IMHO it was still much better than the new layout, which makes the picture much larger and harder to read. I would just always put the label at the left of the bar for consistency and simpler code, but if we can't reach an agreement on that, then I believe the previous layout should be restored.
Comment 1 Thomas H.P. Andersen 2013-10-22 09:17:57 UTC
Yes. That looks like a bug. The code is a bit mixed up too. Will fix.
Comment 2 Thomas H.P. Andersen 2013-11-01 22:24:20 UTC
Fixed here:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=95168f7d55181475946ad93db30255c4d709df03

We guess at the text's width and put it on the left side if there is enough space for it. If not we have to put it on the right. To make sure there is space for it on the right we increase the total width of the svg accordingly.

This logic becomes more irrelevant as the boot time shortens. If userspace starts after only a few seconds then there will almost never be enough space on the left.
Comment 3 Jean Delvare 2013-11-04 08:17:34 UTC
Result looks much better now, thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.