summaryrefslogtreecommitdiff
path: root/doc/invocations-http-server/server.py
diff options
context:
space:
mode:
authorSascha Roloff <sascha.roloff@huawei.com>2025-05-22 14:41:20 +0200
committerSascha Roloff <sascha.roloff@huawei.com>2025-05-22 14:41:20 +0200
commit4531a68d62199e28c5272cb76fdcab7943846078 (patch)
treeb6c5dcdf9b0e738cd62298d1f9cd2464e4baf68c /doc/invocations-http-server/server.py
parente8501865cf7bff5cf7d505b595ccd66ddbd625f7 (diff)
downloadjustbuild-4531a68d62199e28c5272cb76fdcab7943846078.tar.gz
invocation server: add presentation of invocation wall-clock time
Diffstat (limited to 'doc/invocations-http-server/server.py')
-rwxr-xr-xdoc/invocations-http-server/server.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py
index 5cf06539..474fb0a4 100755
--- a/doc/invocations-http-server/server.py
+++ b/doc/invocations-http-server/server.py
@@ -170,6 +170,9 @@ class InvocationServer:
continue
full_invocations_count += 1
target = profile_data.get("target")
+ start_time = profile_data.get("start time")
+ stop_time = profile_data.get("stop time")
+ wall_clock_time = stop_time - start_time if (start_time is not None and stop_time is not None) else None
config = core_config(profile_data.get("configuration", {}))
context = meta_data.get("context", {})
remote = profile_data.get('remote', {})
@@ -185,6 +188,7 @@ class InvocationServer:
"target": json.dumps(target) if target else None,
"config": json.dumps(config) if config else None,
"context": json.dumps(context) if context else None,
+ "wall_clock_time": "%5ds" % (wall_clock_time,) if wall_clock_time else None,
"exit_code": profile_data.get('exit code', 0),
"remote_address": remote_address,
"remote_props": json.dumps(remote_props) if remote_props else None,
@@ -549,6 +553,10 @@ class InvocationServer:
action["name_prefix"] = "%5.1fs" % (t,)
non_cached.append(action)
params["non_cached"] = non_cached
+ start_time = profile.get("start time")
+ stop_time = profile.get("stop time")
+ wall_clock_time = stop_time - start_time if (start_time is not None and stop_time is not None) else None
+ params["wall_clock_time"] = "%ds" % (wall_clock_time,) if wall_clock_time else None
return self.render("invocation.html", params)
@@ -630,10 +638,14 @@ class InvocationServer:
"data": source_data
})
+ start_time = profile.get("start time")
+ stop_time = profile.get("stop time")
+ wall_clock_time = stop_time - start_time if (start_time is not None and stop_time is not None) else None
params["critical_artifact"] = {
"name": max_name,
- "path": max_path_data,
+ "path": max_path_data if max_path_data else None,
"duration": '%0.3fs' % (max_duration,) if max_duration > 0 else None,
+ "wall_clock_time": "%ds" % (wall_clock_time,) if wall_clock_time else None,
}
return self.render("critical_path.html", params)