socket-function 0.38.0 → 0.39.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/profiling/measure.ts +5 -1
package/package.json
CHANGED
package/src/profiling/measure.ts
CHANGED
|
@@ -30,7 +30,8 @@ const measureOverhead = 5 / 1000;
|
|
|
30
30
|
|
|
31
31
|
const AsyncFunction = (async () => { }).constructor;
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
// NOTE: Also hardcoded in diskLogger.ts (in querysub)
|
|
34
|
+
const noDiskLogPrefix = "█ ";
|
|
34
35
|
|
|
35
36
|
// TIMING: 1-5us. I have seen timing values greatly vary, but it does seem to be quite high, despite
|
|
36
37
|
// microbenchmarks saying it is slow. Perhaps it is because getOwnTime breaks the cpu pipeline,
|
|
@@ -78,6 +79,9 @@ export function measureBlock<T extends (...args: any[]) => any>(fnc: T, name?: s
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
let extraInfoGetters: (() => string | undefined)[] = [];
|
|
82
|
+
/** NOTE: You should often call registerNodeMetadata for this as well. registerMeasureInfo
|
|
83
|
+
* is for logs, while registerNodeMetadata is for the overview page.
|
|
84
|
+
*/
|
|
81
85
|
export function registerMeasureInfo(getInfo: () => string | undefined) {
|
|
82
86
|
extraInfoGetters.push(getInfo);
|
|
83
87
|
}
|