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 /doc/invocations-http-server/server.py | |
parent | f077a55bcccfb4717b51485911d502f554dcc976 (diff) | |
download | justbuild-9ec26122b70e2653481833eb13a006a8fdeddc74.tar.gz |
Invocation server: include action count
Diffstat (limited to 'doc/invocations-http-server/server.py')
-rwxr-xr-x | doc/invocations-http-server/server.py | 7 |
1 files changed, 7 insertions, 0 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 |