]> err.no Git - systemd/commitdiff
analyze: report startup time in plot mode as well
authorKoen Kooi <koen@dominion.thruhere.net>
Thu, 22 Sep 2011 13:24:18 +0000 (15:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 23 Sep 2011 14:28:28 +0000 (16:28 +0200)
It now prints something like "Startup finished in 1507ms (kernel) + 850ms (userspace) = 2357ms" below the legend.

src/systemd-analyze

index 649d0e1273b0e2e6a083881c37272ea5b8db2278..ac6404099e12efef93f5972e6527722ce7f0f801 100755 (executable)
@@ -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()