diff --git a/export.js b/export.js index 4912f97..c0cfac4 100644 --- a/export.js +++ b/export.js @@ -37,7 +37,7 @@ function processTableExport(table) { var startTime = Date.now(); jsonfile.on('finish', function () { var timeTaken = (Date.now() - startTime) / 1000; - var throughput = processed / timeTaken; + var throughput = timeTaken ? processed / timeTaken : 0.00; console.log('Done with table, throughput: ' + throughput.toFixed(1) + ' rows/s'); resolve(); }); diff --git a/import.js b/import.js index 71876c8..0efca88 100644 --- a/import.js +++ b/import.js @@ -109,7 +109,7 @@ function processTableImport(table) { Promise.all(queryPromises) .then(function (){ var timeTaken = (Date.now() - startTime) / 1000; - var throughput = processed / timeTaken; + var throughput = timeTaken ? processed / timeTaken : 0.00; console.log('Done with table, throughput: ' + throughput.toFixed(1) + ' rows/s'); resolve(); })