From 9ec26122b70e2653481833eb13a006a8fdeddc74 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 6 May 2025 17:47:20 +0200 Subject: Invocation server: include action count --- doc/invocations-http-server/server.py | 7 +++++++ doc/invocations-http-server/templates/invocation.html | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'doc/invocations-http-server') diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py index e7969e6a..8c7e70ea 100755 --- a/doc/invocations-http-server/server.py +++ b/doc/invocations-http-server/server.py @@ -289,10 +289,17 @@ class InvocationServer: # longest running non-cached non-failed actions candidates = [] + action_count = 0 + action_count_cached = 0 for k, v in profile.get('actions', {}).items(): + action_count += 1 if not v.get('cached'): if v.get('exit code', 0) == 0: candidates.append((v.get('duration', 0.0), k, v)) + else: + action_count_cached += 1 + params["action_count"] = action_count + params["action_count_cached"] = action_count_cached candidates.sort(reverse=True) non_cached = [] params["more_noncached"] = None diff --git a/doc/invocations-http-server/templates/invocation.html b/doc/invocations-http-server/templates/invocation.html index c204efa3..8a59cbd7 100644 --- a/doc/invocations-http-server/templates/invocation.html +++ b/doc/invocations-http-server/templates/invocation.html @@ -124,7 +124,13 @@ Inocations {{invocation | e}} {% else %} {% if exit_code == 0 or exit_code == 1 or exit_code == 2 %} -

Failed actions

+

Actions

+ + +

Failed actions

{% if failed_actions %}