summaryrefslogtreecommitdiff
path: root/doc/invocations-http-server
diff options
context:
space:
mode:
Diffstat (limited to 'doc/invocations-http-server')
-rwxr-xr-xdoc/invocations-http-server/server.py18
-rw-r--r--doc/invocations-http-server/templates/invocation.html17
2 files changed, 33 insertions, 2 deletions
diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py
index 6ff6b668..d1791c16 100755
--- a/doc/invocations-http-server/server.py
+++ b/doc/invocations-http-server/server.py
@@ -391,7 +391,10 @@ class InvocationServer:
def action_data(name, profile_value):
data = { "name_prefix": "",
"name": name,
+ "cached": profile_value.get('cached'),
"exit_code": profile_value.get('exit code', 0)}
+ duration = profile_value.get('duration', 0.0)
+ data["duration"] = '%0.3fs' % (duration,) if duration > 0 else None
desc = graph.get('actions', {}).get(name, {})
data["may_fail"] = desc.get("may_fail")
data["stdout"] = profile_value.get('stdout')
@@ -414,24 +417,35 @@ class InvocationServer:
data["origins"] = origins
return data
+ actions_considered = set()
failed_build_actions = []
failed_test_actions = []
for k, v in profile.get('actions', {}).items():
if v.get('exit code', 0) != 0:
+ actions_considered.add(k)
if graph.get('actions', {}).get(k, {}).get('may_fail') != None:
failed_test_actions.append(action_data(k, v))
else:
failed_build_actions.append(action_data(k, v))
params["failed_actions"] = failed_build_actions + failed_test_actions
- # longest running non-cached non-failed actions
+ # non-failed actions with output
+ output_actions = []
+ for k, v in profile.get('actions', {}).items():
+ if k not in actions_considered:
+ if v.get('stdout') or v.get('stderr'):
+ actions_considered.add(k)
+ output_actions.append(action_data(k,v))
+ params["output_actions"] = output_actions
+
+ # longest running non-cached non-failed actions without output
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:
+ if k not in actions_considered:
candidates.append((v.get('duration', 0.0), k, v))
else:
action_count_cached += 1
diff --git a/doc/invocations-http-server/templates/invocation.html b/doc/invocations-http-server/templates/invocation.html
index 50d5690a..2ebebb86 100644
--- a/doc/invocations-http-server/templates/invocation.html
+++ b/doc/invocations-http-server/templates/invocation.html
@@ -38,6 +38,12 @@ Inocations {{invocation | e}}
</ul>
</li>
{% endif %}
+ {% if action["duration"] %}
+ <li> duration: {{ action["duration"] | e }}</li>
+ {% endif %}
+ {% if action["cached"] %}
+ <li> cached: {{ action["cached"] | e }}</li>
+ {% endif %}
{% if action["exit_code"] != 0 %}
<li> exit code: {{ action["exit_code"] }}</li>
{% endif %}
@@ -187,6 +193,17 @@ Inocations {{invocation | e}}
<i>(none)</i>
{% endif %}
+<h3>Other actions with console output</h3>
+{% if output_actions %}
+<ul>
+ {% for action in output_actions %}
+ {{ show_action(action) }}
+ {% endfor %}
+</ul>
+{% else %}
+<i>(none)</i>
+{% endif %}
+
<h3>Remaining non-cached actions</h3>
{% if non_cached %}