@naturalcycles/nodejs-lib 12.48.1 → 12.48.2

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.
@@ -72,14 +72,14 @@ function transformLogProgress(opt = {}) {
72
72
  : {}),
73
73
  }, inspectOpt));
74
74
  if (tenx) {
75
- let perHour = Math.round((progress * 1000 * 60 * 60) / (now - started)) || 0;
75
+ let perHour = Math.round((batchedProgress * 1000 * 60 * 60) / (now - started)) || 0;
76
76
  if (perHour > 900) {
77
77
  perHour = Math.round(perHour / 1000) + 'K';
78
78
  }
79
- console.log(`${(0, colors_1.dimGrey)((0, time_lib_1.dayjs)().toPretty())} ${(0, colors_1.white)(metric)} took ${(0, colors_1.yellow)((0, js_lib_1._since)(started))} so far to process ${(0, colors_1.yellow)(progress)} rows, ~${(0, colors_1.yellow)(perHour)}/hour`);
79
+ console.log(`${(0, colors_1.dimGrey)((0, time_lib_1.dayjs)().toPretty())} ${(0, colors_1.white)(metric)} took ${(0, colors_1.yellow)((0, js_lib_1._since)(started))} so far to process ${(0, colors_1.yellow)(batchedProgress)} rows, ~${(0, colors_1.yellow)(perHour)}/hour`);
80
80
  }
81
81
  else if (final) {
82
- console.log(`${(0, colors_1.boldWhite)(metric)} took ${(0, colors_1.yellow)((0, js_lib_1._since)(started))} to process ${(0, colors_1.yellow)(progress)} rows with total RPS of ${(0, colors_1.yellow)(rpsTotal)}`);
82
+ console.log(`${(0, colors_1.boldWhite)(metric)} took ${(0, colors_1.yellow)((0, js_lib_1._since)(started))} to process ${(0, colors_1.yellow)(batchedProgress)} rows with total RPS of ${(0, colors_1.yellow)(rpsTotal)}`);
83
83
  }
84
84
  }
85
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/nodejs-lib",
3
- "version": "12.48.1",
3
+ "version": "12.48.2",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "docs-serve": "vuepress dev docs",
@@ -197,7 +197,8 @@ export function transformLogProgress<IN = any>(
197
197
  )
198
198
 
199
199
  if (tenx) {
200
- let perHour: number | string = Math.round((progress * 1000 * 60 * 60) / (now - started)) || 0
200
+ let perHour: number | string =
201
+ Math.round((batchedProgress * 1000 * 60 * 60) / (now - started)) || 0
201
202
  if (perHour > 900) {
202
203
  perHour = Math.round(perHour / 1000) + 'K'
203
204
  }
@@ -205,12 +206,12 @@ export function transformLogProgress<IN = any>(
205
206
  console.log(
206
207
  `${dimGrey(dayjs().toPretty())} ${white(metric)} took ${yellow(
207
208
  _since(started),
208
- )} so far to process ${yellow(progress)} rows, ~${yellow(perHour)}/hour`,
209
+ )} so far to process ${yellow(batchedProgress)} rows, ~${yellow(perHour)}/hour`,
209
210
  )
210
211
  } else if (final) {
211
212
  console.log(
212
213
  `${boldWhite(metric)} took ${yellow(_since(started))} to process ${yellow(
213
- progress,
214
+ batchedProgress,
214
215
  )} rows with total RPS of ${yellow(rpsTotal)}`,
215
216
  )
216
217
  }