socket-function 1.1.28 → 1.1.29
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.
- package/package.json +1 -1
- package/src/batching.ts +2 -1
package/package.json
CHANGED
package/src/batching.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { formatTime } from "./formatting/format";
|
|
2
|
+
import { red } from "./formatting/logColors";
|
|
2
3
|
import { PromiseObj, isNode, timeoutToError } from "./misc";
|
|
3
4
|
import { measureWrap } from "./profiling/measure";
|
|
4
5
|
import { AnyFunction, Args, MaybePromise } from "./types";
|
|
@@ -395,7 +396,7 @@ export async function safeLoop<T, R>(config: {
|
|
|
395
396
|
while (!done) {
|
|
396
397
|
await delay(5000);
|
|
397
398
|
if (done) break;
|
|
398
|
-
let message =
|
|
399
|
+
let message = `${red("SLOW LOOP")} | ${index} / ${data.length} | ${formatTime(Date.now() - startTime)} | ${label}`;
|
|
399
400
|
let timeOnCurrent = Date.now() - indexStartTime;
|
|
400
401
|
if (timeOnCurrent > 5000) {
|
|
401
402
|
message += `| SLOW INDEX (${index}) ${formatTime(timeOnCurrent)}+`;
|