From 6628b73911b5684cfecfcfb90476edfa1293fec8 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 31 Oct 2018 15:43:36 -0700 Subject: [PATCH] Only show database log entries if task takes longer than 10ms --- js/modules/data.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/modules/data.js b/js/modules/data.js index b31c92328926..8fe553efe945 100644 --- a/js/modules/data.js +++ b/js/modules/data.js @@ -196,9 +196,12 @@ function _updateJob(id, data) { resolve: value => { _removeJob(id); const end = Date.now(); - window.log.info( - `SQL channel job ${id} (${fnName}) succeeded in ${end - start}ms` - ); + const delta = end - start; + if (delta > 10) { + window.log.info( + `SQL channel job ${id} (${fnName}) succeeded in ${end - start}ms` + ); + } return resolve(value); }, reject: error => {