3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-24 10:05:03 +00:00

debug: re-enable Automod with extra profiling

This commit is contained in:
Dragory 2021-10-05 23:49:00 +03:00
parent 2fa817d27a
commit ebd18e5374
8 changed files with 43 additions and 8 deletions

View file

@ -0,0 +1,9 @@
import { Profiler } from "knub/dist/Profiler";
import { performance } from "perf_hooks";
export const startProfiling = (profiler: Profiler, key: string) => {
const startTime = performance.now();
return () => {
profiler.addDataPoint(key, performance.now() - startTime);
};
};