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
poky-3e9fc8d0916f1d51dd6b748fff966d8aafd7f438.tar.bz2
poky-3e9fc8d0916f1d51dd6b748fff966d8aafd7f438.zip
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 ):
main.shutdown = 1
pass
except Exception as e:
+ # print errors to log
logger.error(e)
import traceback
- traceback.print_exc()
+ exception_data = traceback.format_exc()
+
+ # save them to database, if possible; if it fails, we already logged to console.
+ try:
+ buildinfohelper.store_log_error("%s\n%s" % (str(e), exception_data))
+ except Exception:
+ pass
+
pass
if interrupted: