From 6b7ba12e549188bccbcb66876b5f169db15c96a5 Mon Sep 17 00:00:00 2001 From: cse47122 Date: Fri, 25 Dec 2020 15:47:47 +0000 Subject: [PATCH] Delete 'stats.js' --- stats.js | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 stats.js diff --git a/stats.js b/stats.js deleted file mode 100644 index 2d22f14..0000000 --- a/stats.js +++ /dev/null @@ -1,17 +0,0 @@ -const ProgressBar = require('progress') - -module.exports = function stats (deviceManager) { - const bar = new ProgressBar('Time :elapsed: | Devices :devices | Measurements :measurements | Writes :writes | Size :size kb | Errors :errors', {total: 1000000}) - - const update = stats => { - stats = JSON.parse(JSON.stringify(stats)) - stats.size = Math.round((stats.size / 1024).toFixed(2)) - bar.tick(stats) - } - - setInterval(() => { - update(deviceManager.getStats()) - }, 100) - - return update -}