@naturalcycles/nodejs-lib 12.48.0 → 12.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -46,8 +46,8 @@ function transformLogProgress(opt = {}) {
|
|
|
46
46
|
return;
|
|
47
47
|
const mem = process.memoryUsage();
|
|
48
48
|
const now = Date.now();
|
|
49
|
-
const lastRPS = processedLastSecond / ((now - lastSecondStarted) / 1000) || 0;
|
|
50
|
-
const rpsTotal = Math.round(progress / ((now - started) / 1000)) || 0;
|
|
49
|
+
const lastRPS = (processedLastSecond * batchSize) / ((now - lastSecondStarted) / 1000) || 0;
|
|
50
|
+
const rpsTotal = Math.round((progress * batchSize) / ((now - started) / 1000)) || 0;
|
|
51
51
|
lastSecondStarted = now;
|
|
52
52
|
processedLastSecond = 0;
|
|
53
53
|
const rps10 = Math.round(sma.push(lastRPS));
|
package/package.json
CHANGED
|
@@ -163,8 +163,8 @@ export function transformLogProgress<IN = any>(
|
|
|
163
163
|
const mem = process.memoryUsage()
|
|
164
164
|
|
|
165
165
|
const now = Date.now()
|
|
166
|
-
const lastRPS = processedLastSecond / ((now - lastSecondStarted) / 1000) || 0
|
|
167
|
-
const rpsTotal = Math.round(progress / ((now - started) / 1000)) || 0
|
|
166
|
+
const lastRPS = (processedLastSecond * batchSize) / ((now - lastSecondStarted) / 1000) || 0
|
|
167
|
+
const rpsTotal = Math.round((progress * batchSize) / ((now - started) / 1000)) || 0
|
|
168
168
|
lastSecondStarted = now
|
|
169
169
|
processedLastSecond = 0
|
|
170
170
|
|