diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-06 17:47:20 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-07 12:03:08 +0200 |
commit | 9ec26122b70e2653481833eb13a006a8fdeddc74 (patch) | |
tree | 1c2d7448c0de39387cdb55246e0ffd6a3d3830b8 | |
parent | f077a55bcccfb4717b51485911d502f554dcc976 (diff) | |
download | justbuild-9ec26122b70e2653481833eb13a006a8fdeddc74.tar.gz |
Invocation server: include action count
-rwxr-xr-x | doc/invocations-http-server/server.py | 7 | ||||
-rw-r--r-- | doc/invocations-http-server/templates/invocation.html | 10 |
2 files changed, 15 insertions, 2 deletions
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}} </ul> {% else %} {% if exit_code == 0 or exit_code == 1 or exit_code == 2 %} -<h2>Failed actions</h2> +<h2>Actions</h2> +<ul> + <li> processed: {{ action_count | e }} + <li> cached: {{ action_count_cached | e }} +</ul> + +<h3>Failed actions</h3> {% if failed_actions %} <ul> {% for action in failed_actions %} @@ -136,7 +142,7 @@ Inocations {{invocation | e}} {% endif %} -<h2>Remaining non-cached actions</h2> +<h3>Remaining non-cached actions</h3> {% if non_cached %} In order of decreasing run time. <ul> |