Patchwork [bitbake-devel,51/94] bitbake: dsi: fix build stats data gathering

login
register
mail settings
Submitter Alexandru DAMIAN
Date Sept. 24, 2013, 4:52 p.m.
Message ID <7bf2232c7d0930d7e55a923d2db720bd480e1267.1380041477.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/58855/
State New
Headers show

Comments

Alexandru DAMIAN - Sept. 24, 2013, 4:52 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

We set the default values for build stats to be NULL so
that we can distinguish the value from a legitimate 0.

Also fixing the data gathering since model field semantics
changed - the version is kept on a separate field.

[YOCTO #4967]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 2 +-
 bitbake/lib/webhob/orm/models.py     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 59b6fa3..1d8cb44 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -286,7 +286,7 @@  class BuildInfoHelper(object):
         target = self.internal_state['target']
         machine = self.internal_state['build'].machine.name
         buildname = self.internal_state['build'].build_name
-        package = task_object.recipe.name
+        package = task_object.recipe.name + "-" + task_object.recipe.version.strip(":")
 
         build_stats_path = build_stats_format.format(tmpdir=tmp_dir, target=target,
                                                      machine=machine, buildname=buildname,
diff --git a/bitbake/lib/webhob/orm/models.py b/bitbake/lib/webhob/orm/models.py
index 774cdff..f2cc7d9 100644
--- a/bitbake/lib/webhob/orm/models.py
+++ b/bitbake/lib/webhob/orm/models.py
@@ -84,8 +84,8 @@  class Task(models.Model):
     script_type = models.IntegerField(choices=TASK_CODING, default=CODING_PYTHON)
     line_number = models.IntegerField(default=0)
     py_stack_trace = models.TextField(null=True)
-    disk_io = models.IntegerField(default=0)
-    cpu_usage = models.DecimalField(max_digits=6, decimal_places=2, default=0)
+    disk_io = models.IntegerField(null=True)
+    cpu_usage = models.DecimalField(max_digits=6, decimal_places=2, null=True)
     elapsed_time = models.CharField(max_length=50, default=0)
     errors_no = models.IntegerField(default=0)
     warnings_no = models.IntegerField(default=0)