summaryrefslogtreecommitdiff
path: root/src/systemd-analyze
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-09-22 11:30:04 +0200
committerLennart Poettering <lennart@poettering.net>2011-09-23 16:28:27 +0200
commit70daa623320835dbad111ca6e4c6f8ae31388904 (patch)
tree788ba594ca7a2845548beea11ef6b35d8788b959 /src/systemd-analyze
parenta65cb51f29ee177f6f800c87232b68475216a418 (diff)
analyze: always draw 1s marker for scale
In situations like this: root@omap4430-panda:~# systemd-analyze Startup finished in 1499ms (kernel) + 916ms (userspace) = 2416ms The svg plot will only have the 0s marker and no subsequent markers for scale. This patch forces the 1s marker to always be drawn.
Diffstat (limited to 'src/systemd-analyze')
-rwxr-xr-xsrc/systemd-analyze4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemd-analyze b/src/systemd-analyze
index ae7dcfbd8a..649d0e1273 100755
--- a/src/systemd-analyze
+++ b/src/systemd-analyze
@@ -147,7 +147,7 @@ elif sys.argv[1] == 'plot':
context.set_line_width(1)
context.set_source_rgb(0.7, 0.7, 0.7)
- for x in range(0, (finish_time - start_time)/10000, 100):
+ for x in range(0, max((finish_time - start_time)/10000,110), 100):
context.move_to(x, 0)
context.line_to(x, height-border*2)
@@ -163,7 +163,7 @@ elif sys.argv[1] == 'plot':
banner = "Running on %s (%s %s) %s" % (os.uname()[1], os.uname()[2], os.uname()[3], os.uname()[4])
draw_text(context, 0, -15, banner, hcenter = 0, vcenter = 1)
- for x in range(0, (finish_time - start_time)/10000, 100):
+ for x in range(0, max((finish_time - start_time)/10000,110), 100):
draw_text(context, x, -5, "%lus" % (x/100), vcenter = 0, hcenter = 0)
y = 0