]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: Add times in seconds for Activating and Activated in tooltip
authorhugo303 <fredrik.hugosson@axis.com>
Fri, 25 Oct 2024 10:15:02 +0000 (12:15 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 30 Oct 2024 10:16:28 +0000 (11:16 +0100)
Print the times in seconds in the tooltip to remove the need to count
and trying to follow the lines in the svg diagram in order to see at
what times these events happen.

src/analyze/analyze-plot.c

index d3316651c9e6d95c3b7900e0639b8e5cfef5dad6..c50343d71c7d52ee1dc946b7793bbf2013768035 100644 (file)
@@ -168,7 +168,9 @@ static void plot_tooltip(const UnitTimes *ut) {
         assert(ut->name);
 
         svg("%s:\n", ut->name);
-
+        svg("Activating: %"PRI_USEC".%.3"PRI_USEC"\n", ut->activating / USEC_PER_SEC, ut->activating % USEC_PER_SEC);
+        svg("Activated: %"PRI_USEC".%.3"PRI_USEC"\n", ut->activated / USEC_PER_SEC, ut->activated % USEC_PER_SEC);
+        
         UnitDependency i;
         FOREACH_ARGUMENT(i, UNIT_AFTER, UNIT_BEFORE, UNIT_REQUIRES, UNIT_REQUISITE, UNIT_WANTS, UNIT_CONFLICTS, UNIT_UPHOLDS)
                 if (!strv_isempty(ut->deps[i])) {