summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2014-02-14 14:58:20 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-09 12:23:58 -0700
commit438578e2997f718f4ab2f50f309364edb6e3b4f8 (patch)
tree11c0c21949ec5ea80cc0fa42289c502c657d6ebb /bitbake
parent93aa4aba74843aff06434d03c4003a86439678c2 (diff)
downloadpoky-438578e2997f718f4ab2f50f309364edb6e3b4f8.tar.gz
bitbake: toaster: extend Tasks to include Time, Disk IO, and CPU Usage
Update the All Tasks page to also cover the Time, Disk I/O, and CPU Usage pages. Add filter count header support, and fix minor column enablements. [YOCTO #4387] (Bitbake rev: 7e78836ebbddf0240094fd79a18cb057d6c4f322) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/orm/models.py4
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_top.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/filtersnippet.html4
-rw-r--r--bitbake/lib/toaster/toastergui/templates/tasks.html93
-rw-r--r--bitbake/lib/toaster/toastergui/views.py323
5 files changed, 235 insertions, 191 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index af44d86ff3..24d8d9c573 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -80,7 +80,7 @@ class Task(models.Model):
80 (SSTATE_NA, 'Not Applicable'), # For rest of tasks, but they still need checking. 80 (SSTATE_NA, 'Not Applicable'), # For rest of tasks, but they still need checking.
81 (SSTATE_MISS, 'Missing'), # it is a miss 81 (SSTATE_MISS, 'Missing'), # it is a miss
82 (SSTATE_FAILED, 'Failed'), # there was a pkg, but the script failed 82 (SSTATE_FAILED, 'Failed'), # there was a pkg, but the script failed
83 (SSTATE_RESTORED, 'Restored'), # succesfully restored 83 (SSTATE_RESTORED, 'Succeeded'), # successfully restored
84 ) 84 )
85 85
86 CODING_NA = 0 86 CODING_NA = 0
@@ -111,7 +111,7 @@ class Task(models.Model):
111 (OUTCOME_EMPTY, 'Empty'), 111 (OUTCOME_EMPTY, 'Empty'),
112 ) 112 )
113 113
114 search_allowed_fields = [ "recipe__name", "task_name" ] 114 search_allowed_fields = [ "recipe__name", "recipe__version", "task_name", "logfile" ]
115 115
116 objects = TaskManager() 116 objects = TaskManager()
117 117
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top.html b/bitbake/lib/toaster/toastergui/templates/basetable_top.html
index 9a8bacb384..fe534618d1 100644
--- a/bitbake/lib/toaster/toastergui/templates/basetable_top.html
+++ b/bitbake/lib/toaster/toastergui/templates/basetable_top.html
@@ -31,7 +31,7 @@
31 <div class="navbar-inner"> 31 <div class="navbar-inner">
32 <form class="navbar-search input-append pull-left" id="searchform"> 32 <form class="navbar-search input-append pull-left" id="searchform">
33 <div class="input-append" style="padding-right:1em"> 33 <div class="input-append" style="padding-right:1em">
34 <input class="input-xxlarge" id="search" name="search" type="text" placeholder="Search {{objectname}}" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on"><i class="icon-remove"></i></a>{%endif%} 34 <input class="input-xxlarge" id="search" name="search" type="text" placeholder="Search {%if object_search_display %}{{object_search_display}}{%else%}{{objectname}}{%endif%}" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on"><i class="icon-remove"></i></a>{%endif%}
35 </div> 35 </div>
36 <input type="hidden" name="orderby" value="{{request.GET.orderby}}"> 36 <input type="hidden" name="orderby" value="{{request.GET.orderby}}">
37 <input type="hidden" name="page" value="1"> 37 <input type="hidden" name="page" value="1">
diff --git a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html
index 4626ffecae..2a23c27d44 100644
--- a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html
+++ b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html
@@ -4,12 +4,12 @@
4 <input type="hidden" name="search" value="{{request.GET.search}}"/> 4 <input type="hidden" name="search" value="{{request.GET.search}}"/>
5 <div class="modal-header"> 5 <div class="modal-header">
6 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> 6 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
7 <h3>Filter {{objectname|title}} by '{{tc.name}}'</h3> 7 <h3>Filter {%if filter_search_display%}{{filter_search_display|title}}{%else%}{{objectname|title}}{%endif%} by '{{tc.name}}'</h3>
8 </div> 8 </div>
9 <div class="modal-body"> 9 <div class="modal-body">
10 <p>{{f.label}}</p> 10 <p>{{f.label}}</p>
11 <label class="radio"> 11 <label class="radio">
12 <input type="radio" name="filter" {%if request.GET.filter%}{{f.options|check_filter_status:request.GET.filter}} {%else%} checked {%endif%} value=""> All {{objectname}} 12 <input type="radio" name="filter" {%if request.GET.filter%}{{f.options|check_filter_status:request.GET.filter}} {%else%} checked {%endif%} value=""> All {%if filter_search_display%}{{filter_search_display|title}}{%else%}{{objectname|title}}{%endif%}
13 </label> 13 </label>
14 {% for option in f.options %} 14 {% for option in f.options %}
15 <label class="radio"> 15 <label class="radio">
diff --git a/bitbake/lib/toaster/toastergui/templates/tasks.html b/bitbake/lib/toaster/toastergui/templates/tasks.html
index 3479e7e1e7..7dc2c38b18 100644
--- a/bitbake/lib/toaster/toastergui/templates/tasks.html
+++ b/bitbake/lib/toaster/toastergui/templates/tasks.html
@@ -1,60 +1,61 @@
1{% extends "basebuildpage.html" %} 1{% extends "basebuildpage.html" %}
2{% load projecttags %} 2{% load projecttags %}
3{% block localbreadcrumb %} 3{% block localbreadcrumb %}
4<li>All tasks</li> 4<li>{{title}}</li>
5{% endblock %} 5{% endblock %}
6 6
7{% block buildinfomain %} 7{% block buildinfomain %}
8<div class="span10"> 8<div class="span10">
9<div class="page-header"> 9<div class="page-header">
10<h1> Tasks </h1> 10<h1>
11 {% if request.GET.filter or request.GET.search and objects.count > 0 %}
12 {{objects.paginator.count}} task{{objects.paginator.count|pluralize}} found
13 {%elif objects.paginator.count == 0%}
14 No tasks
15 {%else%}
16 {{title}}
17 {%endif%}
18 </h1>
11</div> 19</div>
12{% include "basetable_top.html" %} 20{% include "basetable_top.html" %}
13 21
14 22 {% for task in objects %}
15 {% if not objects %} 23 <tr {{ task|task_color }} >
16 <p>No tasks were executed in this build!</p> 24 <td class="order">
17 {% else %} 25 <a href="{%url "task" build.pk task.pk%} ">{{task.order}}</a>
18 {% for task in objects %} 26 </td>
19 <tr {{ task|task_color }} > 27 <td class="recipe_name" >
20 <td class="order"> 28 <a href="{% url "recipe" build.pk task.recipe.pk %}">{{task.recipe.name}}</a>
21 <a href="{%url "task" build.pk task.pk%} ">{{task.order}}</a> 29 </td>
22 </td> 30 <td class="recipe_version">
23 <td class="recipe_name" > 31 <a href="{% url "recipe" build.pk task.recipe.pk %}">{{task.recipe.version}}</a>
24 <a href="{% url "recipe" build.pk task.recipe.pk %}">{{task.recipe.name}}</a> 32 </td>
25 </td> 33 <td class="task_name">
26 <td class="recipe_version"> 34 <a href="{%url "task" build.pk task.pk%} ">{{task.task_name}}</a>
27 <a href="{% url "recipe" build.pk task.recipe.pk %}">{{task.recipe.version}}</a> 35 </td>
28 </td> 36 <td class="executed">
29 <td class="task_name"> 37 <a href="{%url "task" build.pk task.pk%} ">{{task.get_executed_display}}</a>
30 <a href="{%url "task" build.pk task.pk%} ">{{task.task_name}}</a> 38 </td>
31 </td> 39 <td class="outcome">
32 <td class="executed"> 40 <a href="{%url "task" build.pk task.pk%} ">{{task.get_outcome_display}}</a>
33 <a href="{%url "task" build.pk task.pk%} ">{{task.get_executed_display}}</a> 41 </td>
34 </td> 42 <td class="cache_attempt">
35 <td class="outcome"> 43 <a href="{%url "task" build.pk task.pk%} ">{{task.get_sstate_result_display|format_none_and_zero}}</a>
36 <a href="{%url "task" build.pk task.pk%} ">{{task.get_outcome_display}}</a> 44 </td>
37 </td> 45 <td class="time_taken">
38 <td class="cache_attempt"> 46 {{task.elapsed_time|format_none_and_zero|floatformat:2}}
39 <a href="{%url "task" build.pk task.pk%} ">{{task.get_sstate_result_display|format_none_and_zero}}</a> 47 </td>
40 </td> 48 <td class="cpu_used">
41 <td class="time_taken"> 49 {{task.cpu_usage|format_none_and_zero|floatformat:2}}{% if task.cpu_usage %}%{% endif %}
42 {{task.elapsed_time|format_none_and_zero}} 50 </td>
43 </td> 51 <td class="disk_io">
44 <td class="cpu_used"> 52 {{task.disk_io|format_none_and_zero}}
45 {{task.cpu_usage|format_none_and_zero}} 53 </td>
46 </td> 54 <td class="task_log">
47 <td class="disk_io"> 55 {{task.logfile}}
48 {{task.disk_io|format_none_and_zero}} 56 </td>
49 </td> 57 </tr>
50 <td class="task_log"> 58 {% endfor %}
51 {{task.logfile}}
52 </td>
53 </tr>
54
55 {% endfor %}
56
57 {% endif %}
58 59
59{% include "basetable_bottom.html" %} 60{% include "basetable_bottom.html" %}
60</div> 61</div>
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index c786df41fc..a5db136d28 100644
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -406,12 +406,52 @@ def _find_task_provider(task):
406 return trc 406 return trc
407 return None 407 return None
408 408
409def tasks(request, build_id): 409def tasks_common(request, build_id, variant):
410# This class is shared between these pages
411#
412# Column tasks buildtime diskio cpuusage
413# --------- ------ ---------- ------- ---------
414# Cache def
415# CPU min -
416# Disk min -
417# Executed def def def def
418# Log
419# Order def +
420# Outcome def def def def
421# Recipe min min min min
422# Version
423# Task min min min min
424# Time min -
425#
426# 'min':on always, 'def':on by default, else hidden
427# '+' default column sort up, '-' default column sort down
428
429 # default ordering depends on variant
430 if 'buildtime' == variant:
431 title_variant='Time'
432 object_search_display="time data"
433 filter_search_display="tasks"
434 mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'elapsed_time:-'};
435 elif 'diskio' == variant:
436 title_variant='Disk I/O'
437 object_search_display="disk I/O data"
438 filter_search_display="tasks"
439 mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'disk_io:-'};
440 elif 'cpuusage' == variant:
441 title_variant='CPU usage'
442 object_search_display="CPU usage data"
443 filter_search_display="tasks"
444 mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'cpu_usage:-'};
445 else :
446 title_variant='Tasks'
447 object_search_display="tasks"
448 filter_search_display="tasks"
449 mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'order:+'};
450
410 template = 'tasks.html' 451 template = 'tasks.html'
411 mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'order:+'};
412 retval = _verify_parameters( request.GET, mandatory_parameters ) 452 retval = _verify_parameters( request.GET, mandatory_parameters )
413 if retval: 453 if retval:
414 return _redirect_parameters( 'tasks', request.GET, mandatory_parameters, build_id = build_id) 454 return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id)
415 (filter_string, search_term, ordering_string) = _search_tuple(request, Task) 455 (filter_string, search_term, ordering_string) = _search_tuple(request, Task)
416 queryset = Task.objects.filter(build=build_id, order__gt=0) 456 queryset = Task.objects.filter(build=build_id, order__gt=0)
417 queryset = _get_queryset(Task, queryset, filter_string, search_term, ordering_string) 457 queryset = _get_queryset(Task, queryset, filter_string, search_term, ordering_string)
@@ -423,120 +463,153 @@ def tasks(request, build_id):
423# if t.outcome == Task.OUTCOME_COVERED: 463# if t.outcome == Task.OUTCOME_COVERED:
424# t.provider = _find_task_provider(t) 464# t.provider = _find_task_provider(t)
425 465
426 context = { 'objectname': 'tasks', 466 # define (and modify by variants) the 'tablecols' members
467 tc_order={
468 'name':'Order',
469 'qhelp':'The running sequence of each task in the build',
470 'clclass': 'order', 'hidden' : 1,
471 'orderfield':_get_toggle_order(request, "order"),
472 'ordericon':_get_toggle_order_icon(request, "order")}
473 if 'tasks' == variant: tc_order['hidden']='0';
474 tc_recipe={
475 'name':'Recipe',
476 'qhelp':'The name of the recipe to which each task applies',
477 'orderfield': _get_toggle_order(request, "recipe"),
478 'ordericon':_get_toggle_order_icon(request, "recipe"),
479 }
480 tc_recipe_version={
481 'name':'Recipe version',
482 'qhelp':'The version of the recipe to which each task applies',
483 'clclass': 'recipe_version', 'hidden' : 1,
484 }
485 tc_task={
486 'name':'Task',
487 'qhelp':'The name of the task',
488 'orderfield': _get_toggle_order(request, "task_name"),
489 'ordericon':_get_toggle_order_icon(request, "task_name"),
490 }
491 tc_executed={
492 'name':'Executed',
493 'qhelp':"This value tells you if a task had to run in order to generate the task output (executed), or if the output was provided by another task and therefore the task didn't need to run (not executed)",
494 'clclass': 'executed', 'hidden' : 0,
495 'orderfield': _get_toggle_order(request, "task_executed"),
496 'ordericon':_get_toggle_order_icon(request, "task_executed"),
497 'filter' : {
498 'class' : 'executed',
499 'label': 'Show:',
500 'options' : [
501 ('Executed Tasks', 'task_executed:1'),
502 ('Not Executed Tasks', 'task_executed:0'),
503 ]
504 }
505
506 }
507 tc_outcome={
508 'name':'Outcome',
509 'qhelp':'This column tells you if executed tasks succeeded, failed or restored output from the <code>sstate-cache</code> directory or mirrors. It also tells you why not executed tasks did not need to run',
510 'clclass': 'outcome', 'hidden' : 0,
511 'orderfield': _get_toggle_order(request, "outcome"),
512 'ordericon':_get_toggle_order_icon(request, "outcome"),
513 'filter' : {
514 'class' : 'outcome',
515 'label': 'Show:',
516 'options' : [
517 ('Succeeded Tasks', 'outcome:%d'%Task.OUTCOME_SUCCESS),
518 ('Failed Tasks', 'outcome:%d'%Task.OUTCOME_FAILED),
519 ('Cached Tasks', 'outcome:%d'%Task.OUTCOME_CACHED),
520 ('Prebuilt Tasks', 'outcome:%d'%Task.OUTCOME_PREBUILT),
521 ('Covered Tasks', 'outcome:%d'%Task.OUTCOME_COVERED),
522 ('Empty Tasks', 'outcome:%d'%Task.OUTCOME_NA),
523 ]
524 }
525
526 }
527 tc_log={
528 'name':'Log',
529 'qhelp':'The location in disk of the task log file',
530 'orderfield': _get_toggle_order(request, "logfile"),
531 'ordericon':_get_toggle_order_icon(request, "logfile"),
532 'clclass': 'task_log', 'hidden' : 1,
533 }
534 tc_cache={
535 'name':'Cache attempt',
536 'qhelp':'This column tells you if a task tried to restore output from the <code>sstate-cache</code> directory or mirrors, and what was the result: Succeeded, Failed or File not in cache',
537 'clclass': 'cache_attempt', 'hidden' : 1,
538 'orderfield': _get_toggle_order(request, "sstate_result"),
539 'ordericon':_get_toggle_order_icon(request, "sstate_result"),
540 'filter' : {
541 'class' : 'cache_attempt',
542 'label': 'Show:',
543 'options' : [
544 ('Tasks with cache attempts', 'sstate_result:%d'%Task.SSTATE_NA),
545 ("Tasks with 'File not in cache' attempts", 'sstate_result:%d'%Task.SSTATE_MISS),
546 ("Tasks with 'Failed' cache attempts", 'sstate_result:%d'%Task.SSTATE_FAILED),
547 ("Tasks with 'Succeeded' cache attempts", 'sstate_result:%d'%Task.SSTATE_RESTORED),
548 ]
549 }
550
551 }
552 if 'tasks' == variant: tc_cache['hidden']='0'
553 tc_time={
554 'name':'Time (secs)',
555 'qhelp':'How long it took the task to finish, expressed in seconds',
556 'orderfield': _get_toggle_order(request, "elapsed_time", True),
557 'ordericon':_get_toggle_order_icon(request, "elapsed_time"),
558 'clclass': 'time_taken', 'hidden' : 1,
559 }
560 if 'buildtime' == variant: tc_time['hidden']='0'; del tc_time['clclass']
561 tc_cpu={
562 'name':'CPU usage',
563 'qhelp':'Task CPU utilisation, expressed as a percentage',
564 'orderfield': _get_toggle_order(request, "cpu_usage", True),
565 'ordericon':_get_toggle_order_icon(request, "cpu_usage"),
566 'clclass': 'cpu_used', 'hidden' : 1,
567 }
568 if 'cpuusage' == variant: tc_cpu['hidden']='0'; del tc_cpu['clclass']
569 tc_diskio={
570 'name':'Disk I/O (ms)',
571 'qhelp':'Number of miliseconds the task spent doing disk input and output',
572 'orderfield': _get_toggle_order(request, "disk_io", True),
573 'ordericon':_get_toggle_order_icon(request, "disk_io"),
574 'clclass': 'disk_io', 'hidden' : 1,
575 }
576 if 'diskio' == variant: tc_diskio['hidden']='0'; del tc_diskio['clclass']
577
578
579 context = { 'objectname': variant,
580 'object_search_display': object_search_display,
581 'filter_search_display': filter_search_display,
582 'title': title_variant,
427 'build': Build.objects.filter(pk=build_id)[0], 583 'build': Build.objects.filter(pk=build_id)[0],
428 'objects': tasks, 584 'objects': tasks,
429 'tablecols':[ 585 'tablecols':[
430 { 586 tc_order,
431 'name':'Order', 587 tc_recipe,
432 'qhelp':'The running sequence of each task in the build', 588 tc_recipe_version,
433 'orderfield': _get_toggle_order(request, "order"), 589 tc_task,
434 'ordericon':_get_toggle_order_icon(request, "order"), 590 tc_executed,
435 }, 591 tc_outcome,
436 { 592 tc_cache,
437 'name':'Recipe', 593 tc_time,
438 'qhelp':'The name of the recipe to which each task applies', 594 tc_cpu,
439 'orderfield': _get_toggle_order(request, "recipe"), 595 tc_diskio,
440 'ordericon':_get_toggle_order_icon(request, "recipe"), 596 tc_log,
441 }, 597 ]}
442 {
443 'name':'Recipe version',
444 'qhelp':'The version of the recipe to which each task applies',
445 'clclass': 'recipe_version',
446 'hidden' : 1,
447 },
448 {
449 'name':'Task',
450 'qhelp':'The name of the task',
451 'orderfield': _get_toggle_order(request, "task_name"),
452 'ordericon':_get_toggle_order_icon(request, "task_name"),
453 },
454 {
455 'name':'Executed',
456 'qhelp':"This value tells you if a task had to run in order to generate the task output (executed), or if the output was provided by another task and therefore the task didn't need to run (not executed)",
457 'orderfield': _get_toggle_order(request, "task_executed"),
458 'ordericon':_get_toggle_order_icon(request, "task_executed"),
459 'filter' : {
460 'class' : 'executed',
461 'label': 'Show:',
462 'options' : [
463 ('Executed Tasks', 'task_executed:1'),
464 ('Not Executed Tasks', 'task_executed:0'),
465 ]
466 }
467 598
468 }, 599 return render(request, template, context)
469 {
470 'name':'Outcome',
471 'qhelp':'This column tells you if executed tasks succeeded, failed or restored output from the <code>sstate-cache</code> directory or mirrors. It also tells you why not executed tasks did not need to run',
472 'orderfield': _get_toggle_order(request, "outcome"),
473 'ordericon':_get_toggle_order_icon(request, "outcome"),
474 'filter' : {
475 'class' : 'outcome',
476 'label': 'Show:',
477 'options' : [
478 ('Succeeded Tasks', 'outcome:%d'%Task.OUTCOME_SUCCESS),
479 ('Failed Tasks', 'outcome:%d'%Task.OUTCOME_FAILED),
480 ('Cached Tasks', 'outcome:%d'%Task.OUTCOME_CACHED),
481 ('Prebuilt Tasks', 'outcome:%d'%Task.OUTCOME_PREBUILT),
482 ('Covered Tasks', 'outcome:%d'%Task.OUTCOME_COVERED),
483 ('Empty Tasks', 'outcome:%d'%Task.OUTCOME_NA),
484 ]
485 }
486 600
487 }, 601def tasks(request, build_id):
488 { 602 return tasks_common(request, build_id, 'tasks')
489 'name':'Cache attempt',
490 'qhelp':'This column tells you if a task tried to restore output from the <code>sstate-cache</code> directory or mirrors, and what was the result: Succeeded, Failed or File not in cache',
491 'orderfield': _get_toggle_order(request, "sstate_result"),
492 'ordericon':_get_toggle_order_icon(request, "sstate_result"),
493 'filter' : {
494 'class' : 'cache_attempt',
495 'label': 'Show:',
496 'options' : [
497 ('Tasks with cache attempts', 'sstate_result:%d'%Task.SSTATE_NA),
498 ("Tasks with 'File not in cache' attempts", 'sstate_result:%d'%Task.SSTATE_MISS),
499 ("Tasks with 'Failed' cache attempts", 'sstate_result:%d'%Task.SSTATE_FAILED),
500 ("Tasks with 'Succeeded' cache attempts", 'sstate_result:%d'%Task.SSTATE_RESTORED),
501 ]
502 }
503 603
504 }, 604def buildtime(request, build_id):
505 { 605 return tasks_common(request, build_id, 'buildtime')
506 'name':'Time (secs)', 606
507 'qhelp':'How long it took the task to finish, expressed in seconds', 607def diskio(request, build_id):
508 'orderfield': _get_toggle_order(request, "elapsed_time"), 608 return tasks_common(request, build_id, 'diskio')
509 'ordericon':_get_toggle_order_icon(request, "elapsed_time"), 609
510 'clclass': 'time_taken', 610def cpuusage(request, build_id):
511 'hidden' : 1, 611 return tasks_common(request, build_id, 'cpuusage')
512 },
513 {
514 'name':'CPU usage',
515 'qhelp':'Task CPU utilisation, expressed as a percentage',
516 'orderfield': _get_toggle_order(request, "cpu_usage"),
517 'ordericon':_get_toggle_order_icon(request, "cpu_usage"),
518 'clclass': 'cpu_used',
519 'hidden' : 1,
520 },
521 {
522 'name':'Disk I/O (ms)',
523 'qhelp':'Number of miliseconds the task spent doing disk input and output',
524 'orderfield': _get_toggle_order(request, "disk_io"),
525 'ordericon':_get_toggle_order_icon(request, "disk_io"),
526 'clclass': 'disk_io',
527 'hidden' : 1,
528 },
529 {
530 'name':'Log',
531 'qhelp':'The location in disk of the task log file',
532 'orderfield': _get_toggle_order(request, "logfile"),
533 'ordericon':_get_toggle_order_icon(request, "logfile"),
534 'clclass': 'task_log',
535 'hidden' : 1,
536 },
537 ]}
538 612
539 return render(request, template, context)
540 613
541def recipes(request, build_id): 614def recipes(request, build_id):
542 template = 'recipes.html' 615 template = 'recipes.html'
@@ -688,36 +761,6 @@ def configvars(request, build_id):
688 return render(request, template, context) 761 return render(request, template, context)
689 762
690 763
691def buildtime(request, build_id):
692 template = "buildtime.html"
693 if Build.objects.filter(pk=build_id).count() == 0 :
694 return redirect(builds)
695 context = {
696 'build' : Build.objects.filter(pk=build_id)[0],
697 }
698 return render(request, template, context)
699
700def cpuusage(request, build_id):
701 template = "cpuusage.html"
702 if Build.objects.filter(pk=build_id).count() == 0 :
703 return redirect(builds)
704 context = {
705 'build' : Build.objects.filter(pk=build_id)[0],
706 }
707 return render(request, template, context)
708
709def diskio(request, build_id):
710 template = "diskio.html"
711 if Build.objects.filter(pk=build_id).count() == 0 :
712 return redirect(builds)
713 context = {
714 'build' : Build.objects.filter(pk=build_id)[0],
715 }
716 return render(request, template, context)
717
718
719
720
721def bpackage(request, build_id): 764def bpackage(request, build_id):
722 template = 'bpackage.html' 765 template = 'bpackage.html'
723 mandatory_parameters = { 'count': 100, 'page' : 1, 'orderby':'name:+'}; 766 mandatory_parameters = { 'count': 100, 'page' : 1, 'orderby':'name:+'};