1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

bitbake: toaster: rework task buildstats storage and display

The data available from buildstats is now more fine grained than
previously, so take advantage of that to enrich the data we save
against tasks:

* Store the CPU usage for user and system separately, and display
them separately.
* Disk IO is now measured in bytes, not ms. Also store the
read/write bytes separately.
* Store started and ended times, as well as elapsed_time. This
will enable future features such as showing which tasks were
running at a particular point in the build.

There was also a problem with how we were looking up the Task
object, which meant that the buildstats were being added to
new tasks which weren't correctly associated with the build. Fix
how we look up the Task (only looking for tasks which match the
build, and the task and recipe names in the build stats data) so
the build stats are associated with the correct task.

[YOCTO #8842]

(Bitbake rev: efa6f915566b979bdbad233ae195b413cef1b8da)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Elliot Smith
2016-03-08 11:32:12 +00:00
committed by Richard Purdie
parent cc74a8ae26
commit 0dcab0258e
8 changed files with 163 additions and 79 deletions
@@ -238,7 +238,7 @@
</dl>
{# Performance section - shown only for executed tasks #}
{%if task.elapsed_time or task.cpu_usage or task.disk_io %}
{%if task.elapsed_time or task.cpu_time_user or task.cpu_time_system or task.disk_io %}
<h2 class="details">Performance</h2>
{% endif %}
<dl class="dl-horizontal">
@@ -249,19 +249,26 @@
</dt>
<dd>{{task.elapsed_time|format_none_and_zero|floatformat:2}}</dd>
{% endif %}
{% if task.cpu_usage > 0 %}
{% if task.cpu_time_user > 0 %}
<dt>
<i class="icon-question-sign get-help" title="The percentage of task CPU utilization"></i>
CPU usage
<i class="icon-question-sign get-help" title="Total amount of time spent executing in user mode, in seconds. Note that this time can be greater than the task time due to parallel execution."></i>
User CPU time (secs)
</dt>
<dd>{{task.cpu_usage|format_none_and_zero|floatformat:2}}%</dd>
<dd>{{task.cpu_time_user|format_none_and_zero|floatformat:2}}</dd>
{% endif %}
{% if task.cpu_time_system > 0 %}
<dt>
<i class="icon-question-sign get-help" title="Total amount of time spent executing in kernel mode, in seconds. Note that this time can be greater than the task time due to parallel execution."></i>
System CPU time (secs)
</dt>
<dd>{{task.cpu_time_system|format_none_and_zero|floatformat:2}}</dd>
{% endif %}
{% if task.disk_io > 0 %}
<dt>
<i class="icon-question-sign get-help" title="Number of miliseconds the task spent doing disk input and output"></i>
Disk I/O (ms)
<i class="icon-question-sign get-help" title="Number of bytes written to and read from the disk during the task"></i>
Disk I/O (bytes)
</dt>
<dd>{{task.disk_io|format_none_and_zero}}</dd>
<dd>{{task.disk_io|format_none_and_zero|intcomma}}</dd>
{% endif %}
</dl>