summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/toasterui.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-11-04 16:47:36 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-12 17:04:48 +0000
commit3e9fc8d0916f1d51dd6b748fff966d8aafd7f438 (patch)
tree5cd0a018efd4447f8ddff50724aa049037eb40c5 /bitbake/lib/bb/ui/toasterui.py
parent0ca70ce37aa8cec6a74ec874a7b11597b608c403 (diff)
downloadpoky-3e9fc8d0916f1d51dd6b748fff966d8aafd7f438.tar.gz
bitbake: toasterui: performance improvements
Improve the performance of data logging in toasterui. We modify the data queries used to: * cache searching in memory * insert in bulk (i.e. multiple values per insert, where possible) On development test rig (networked mysql), on no-op build, time for data recording is reduced from 4:10 to 1:30 (minutes). We also improve the logging, so it is easier to detect toasterui errors. (Bitbake rev: d42784432f927f58730caf80546c66772e0fec89) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/toasterui.py')
-rw-r--r--bitbake/lib/bb/ui/toasterui.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index 007c6b6114..b9e8029da1 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -295,9 +295,17 @@ def main(server, eventHandler, params ):
295 main.shutdown = 1 295 main.shutdown = 1
296 pass 296 pass
297 except Exception as e: 297 except Exception as e:
298 # print errors to log
298 logger.error(e) 299 logger.error(e)
299 import traceback 300 import traceback
300 traceback.print_exc() 301 exception_data = traceback.format_exc()
302
303 # save them to database, if possible; if it fails, we already logged to console.
304 try:
305 buildinfohelper.store_log_error("%s\n%s" % (str(e), exception_data))
306 except Exception:
307 pass
308
301 pass 309 pass
302 310
303 if interrupted: 311 if interrupted: