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:
parent
b099cfedb8
commit
fa638abe13
5 changed files with 72 additions and 26 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue