summaryrefslogtreecommitdiff
path: root/src/systemd-analyze
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-09-22 15:24:18 +0200
committerLennart Poettering <lennart@poettering.net>2011-09-23 16:28:28 +0200
commitf2b33002cd5747ebf288d20a352655307f97aac5 (patch)
tree1227293c2c2b6cdc5d3ceffa3be2ad2b16eeff80 /src/systemd-analyze
parent70daa623320835dbad111ca6e4c6f8ae31388904 (diff)
analyze: report startup time in plot mode as well
It now prints something like "Startup finished in 1507ms (kernel) + 850ms (userspace) = 2357ms" below the legend.
Diffstat (limited to 'src/systemd-analyze')
-rwxr-xr-xsrc/systemd-analyze12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/systemd-analyze b/src/systemd-analyze
index 649d0e1273..ac6404099e 100755
--- a/src/systemd-analyze
+++ b/src/systemd-analyze
@@ -221,6 +221,18 @@ elif sys.argv[1] == 'plot':
draw_text(context, 0, height-border*2, "Legend: Red = Activating; Pink = Active; Dark Pink = Deactivating", hcenter = 0, vcenter = -1)
+ if initrd_time > 0:
+ draw_text(context, 0, height-border*2 + bar_height, "Startup finished in %lums (kernel) + %lums (initrd) + %lums (userspace) = %lums" % ( \
+ initrd_time/1000, \
+ (start_time - initrd_time)/1000, \
+ (finish_time - start_time)/1000, \
+ finish_time/1000), hcenter = 0, vcenter = -1)
+ else:
+ draw_text(context, 0, height-border*2 + bar_height, "Startup finished in %lums (kernel) + %lums (userspace) = %lums" % ( \
+ start_time/1000, \
+ (finish_time - start_time)/1000, \
+ finish_time/1000), hcenter = 0, vcenter = -1)
+
surface.finish()
elif sys.argv[1] in ("help", "--help", "-h"):
help()