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

feat: add env var to enable profiling

This commit is contained in:
Dragory 2021-10-28 17:11:56 +03:00
parent b099cfedb8
commit fa638abe13
5 changed files with 72 additions and 26 deletions

View file

@ -32,6 +32,7 @@ import { runExpiredArchiveDeletionLoop } from "./data/loops/expiredArchiveDeleti
import { runSavedMessageCleanupLoop } from "./data/loops/savedMessageCleanupLoop";
import { performance } from "perf_hooks";
import { setProfiler } from "./profiler";
import { enableProfiling } from "./utils/easyProfiler";
if (!process.env.KEY) {
// tslint:disable-next-line:no-console
@ -365,6 +366,9 @@ connect().then(async () => {
});
setProfiler(bot.profiler);
if (process.env.PROFILING === "true") {
enableProfiling();
}
bot.initialize();
logger.info("Bot Initialized");