Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display per-job metrics on Job Detail page #4024

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions templates/job/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,50 @@ <h1 class="min-w-0 text-3xl break-words md:text-4xl font-bold text-slate-900">
</dl>
{% /card %}

{% if request.user.all_roles %}
{% #card title="Job metrics" subtitle="Computed for the time spent running on the backend" %}
<dl class="border-t border-slate-200 sm:divide-y sm:divide-slate-200">
{% #description_item title="Mean CPU usage" %}
{% if job.metrics %}
<span class="relative group cursor-pointer">
{{ job.metrics.cpu_mean|floatformat:"0" }}%
{% tooltip content="Values are reported across all CPU cores" %}
</span>
{% else %}
-
{% endif %}
{% /description_item %}

{% #description_item title="Peak CPU usage" %}
{% if job.metrics %}
<span class="relative group cursor-pointer">
{{ job.metrics.cpu_peak|floatformat:"0" }}%
{% tooltip content="Values are reported across all CPU cores" %}
</span>
{% else %}
-
{% endif %}
{% /description_item %}

{% #description_item title="Mean memory usage" %}
{% if job.metrics %}
{{ job.metrics.mem_mb_mean|floatformat:"0g" }} MB
{% else %}
-
{% endif %}
{% /description_item %}

{% #description_item title="Peak memory usage" %}
{% if job.metrics %}
{{ job.metrics.mem_mb_peak|floatformat:"0g" }} MB
{% else %}
-
{% endif %}
{% /description_item %}
</dl>
{% /card %}
{% endif %}

{% if honeycomb_links %}
{% #card title="Monitoring" subtitle="Honeycomb login required" container %}
<ul class="flex flex-col gap-y-1.5 list-disc text-sm">
Expand Down
Loading