diff options
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 14be221726..eb0e425e2c 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
@@ -241,14 +241,16 @@ class ORMWrapper(object): | |||
241 | recipe__name = recipe_name | 241 | recipe__name = recipe_name |
242 | ) | 242 | ) |
243 | 243 | ||
244 | task_to_update.started = self._timestamp_to_datetime(task_stats['started']) | 244 | if 'started' in task_stats and 'ended' in task_stats: |
245 | task_to_update.ended = self._timestamp_to_datetime(task_stats['ended']) | 245 | task_to_update.started = self._timestamp_to_datetime(task_stats['started']) |
246 | task_to_update.elapsed_time = (task_stats['ended'] - task_stats['started']) | 246 | task_to_update.ended = self._timestamp_to_datetime(task_stats['ended']) |
247 | task_to_update.cpu_time_user = task_stats['cpu_time_user'] | 247 | task_to_update.elapsed_time = (task_stats['ended'] - task_stats['started']) |
248 | task_to_update.cpu_time_system = task_stats['cpu_time_system'] | 248 | task_to_update.cpu_time_user = task_stats.get('cpu_time_user') |
249 | task_to_update.disk_io_read = task_stats['disk_io_read'] | 249 | task_to_update.cpu_time_system = task_stats.get('cpu_time_system') |
250 | task_to_update.disk_io_write = task_stats['disk_io_write'] | 250 | if 'disk_io_read' in task_stats and 'disk_io_write' in task_stats: |
251 | task_to_update.disk_io = task_stats['disk_io_read'] + task_stats['disk_io_write'] | 251 | task_to_update.disk_io_read = task_stats['disk_io_read'] |
252 | task_to_update.disk_io_write = task_stats['disk_io_write'] | ||
253 | task_to_update.disk_io = task_stats['disk_io_read'] + task_stats['disk_io_write'] | ||
252 | 254 | ||
253 | task_to_update.save() | 255 | task_to_update.save() |
254 | 256 | ||