socket-function 0.51.0 → 0.52.0
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/callManager.ts +2 -1
package/package.json
CHANGED
package/src/callManager.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { _setSocketContext } from "../SocketFunction";
|
|
|
4
4
|
import { entries, isNode } from "./misc";
|
|
5
5
|
import debugbreak from "debugbreak";
|
|
6
6
|
import { measureWrap } from "./profiling/measure";
|
|
7
|
+
import { formatTime } from "./formatting/format";
|
|
7
8
|
|
|
8
9
|
let classes: {
|
|
9
10
|
[classGuid: string]: {
|
|
@@ -148,7 +149,7 @@ export const runClientHooks = measureWrap(async function runClientHooks(
|
|
|
148
149
|
await hook(context);
|
|
149
150
|
time = Date.now() - time;
|
|
150
151
|
if (time > 100) {
|
|
151
|
-
console.warn(`Slow client hook: ${JSON.stringify(hook.name || hook.toString().slice(0, 100))}
|
|
152
|
+
console.warn(`Slow (${formatTime(time)}) client hook: ${JSON.stringify(hook.name || hook.toString().slice(0, 100))} for ${callType.classGuid}.${callType.functionName}(...)`);
|
|
152
153
|
}
|
|
153
154
|
// NOTE: See ClientHookContext.overrideResult for why we break here
|
|
154
155
|
if ("overrideResult" in context) {
|