diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-27 11:00:30 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-28 12:32:04 +0200 |
commit | 9ea3dbd7a3f80a5813dceb11dea416dc7a01d039 (patch) | |
tree | 08e241714ef4fa00475a10e79256454c2fa3c1b5 /doc | |
parent | ae33d0f287e83769dbef9287e64006e1c0c463e9 (diff) | |
download | justbuild-9ea3dbd7a3f80a5813dceb11dea416dc7a01d039.tar.gz |
Invocation server: also show the build time
Also show only the build time in the invocations overview, as only
for the build phase detailled timing information will be available
in the log of a particular information.
Diffstat (limited to 'doc')
4 files changed, 16 insertions, 10 deletions
diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py index 474fb0a4..b64252d6 100755 --- a/doc/invocations-http-server/server.py +++ b/doc/invocations-http-server/server.py @@ -170,9 +170,9 @@ class InvocationServer: continue full_invocations_count += 1 target = profile_data.get("target") - start_time = profile_data.get("start time") + build_start_time = profile_data.get("build 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 + build_wall_clock_time = stop_time - build_start_time if (build_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', {}) @@ -188,7 +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, + "build_wall_clock_time": "%5ds" % (build_wall_clock_time,) if build_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, @@ -554,9 +554,12 @@ class InvocationServer: non_cached.append(action) params["non_cached"] = non_cached start_time = profile.get("start time") + build_start_time = profile.get("build 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 + build_wall_clock_time = stop_time - build_start_time if (build_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 + params["build_wall_clock_time"] = "%ds" % (build_wall_clock_time,) if build_wall_clock_time else None return self.render("invocation.html", params) @@ -638,14 +641,14 @@ class InvocationServer: "data": source_data }) - start_time = profile.get("start time") + build_start_time = profile.get("build 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 + build_wall_clock_time = stop_time - build_start_time if (build_start_time is not None and stop_time is not None) else None params["critical_artifact"] = { "name": max_name, "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, + "build_wall_clock_time": "%ds" % (build_wall_clock_time,) if build_wall_clock_time else None, } return self.render("critical_path.html", params) diff --git a/doc/invocations-http-server/templates/critical_path.html b/doc/invocations-http-server/templates/critical_path.html index e345b50b..630e06ab 100644 --- a/doc/invocations-http-server/templates/critical_path.html +++ b/doc/invocations-http-server/templates/critical_path.html @@ -11,8 +11,8 @@ Invocations {{invocation | e}} <h2>Overview</h2> <ul> <li>Invocation: <a href="/invocations/{{ invocation | e }}"><tt>{{ invocation | e }}</tt></a></li> - {% if critical_artifact["wall_clock_time"] %} - <li>Wall-clock time: <tt>{{ critical_artifact["wall_clock_time"] | e }}</tt></li> + {% if critical_artifact["build_wall_clock_time"] %} + <li>Wall-clock time (build only): <tt>{{ critical_artifact["build_wall_clock_time"] | e }}</tt></li> {% endif %} {% if critical_artifact["duration"] %} <li>Length of critical path: <tt>{{ critical_artifact["duration"] | e }}</tt></li> diff --git a/doc/invocations-http-server/templates/invocation.html b/doc/invocations-http-server/templates/invocation.html index 6babb751..8042e19b 100644 --- a/doc/invocations-http-server/templates/invocation.html +++ b/doc/invocations-http-server/templates/invocation.html @@ -78,6 +78,9 @@ Invocation {{invocation | e}} {% if wall_clock_time %} <li> Wall-clock time: <tt>{{ wall_clock_time | e }}</tt></li> {% endif %} + {% if build_wall_clock_time %} + <li> Wall-clock time (build only): <tt>{{ build_wall_clock_time | e }}</tt></li> + {% endif %} {% if exit_code != None %} <li> Exit code: <tt>{{ exit_code | e }}</tt></li> {% endif %} diff --git a/doc/invocations-http-server/templates/invocations.html b/doc/invocations-http-server/templates/invocations.html index b5ef5433..d22b349a 100644 --- a/doc/invocations-http-server/templates/invocations.html +++ b/doc/invocations-http-server/templates/invocations.html @@ -72,8 +72,8 @@ Filter by: {% if invocation.target %} <span id="invocation-target"><tt>{{ invocation.target | e}}</tt></span> {% endif %} - {% if invocation.wall_clock_time %} - <tt>{{ invocation.wall_clock_time | e}}</tt> + {% if invocation.build_wall_clock_time %} + <tt>{{ invocation.build_wall_clock_time | e}}</tt> {% endif %} {% if invocation.exit_code != 0 %} <span id="invocation-failure"><b> |