mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
cleanup cleanup cleanup on isle dd (#2792)
* cleanup cleanup cleanup on isle dd * fix: rest manager import in test
This commit is contained in:
+18
-16
@@ -1,28 +1,30 @@
|
||||
import { memoryBenchmarks } from "https://raw.githubusercontent.com/discordeno/benchmarks/main/index.ts";
|
||||
import { createBot } from '../mod.ts.js';
|
||||
import { enableCachePlugin } from '../plugins/mod.ts.js';
|
||||
import { memoryBenchmarks } from 'https://raw.githubusercontent.com/discordeno/benchmarks/main/index.ts'
|
||||
import { createBot } from '../mod.ts.js'
|
||||
import { enableCachePlugin } from '../plugins/mod.ts.js'
|
||||
|
||||
const results = await memoryBenchmarks(() =>
|
||||
enableCachePlugin(createBot({
|
||||
token: " ",
|
||||
botId: 0n,
|
||||
}))
|
||||
);
|
||||
enableCachePlugin(
|
||||
createBot({
|
||||
token: ' ',
|
||||
botId: 0n,
|
||||
}),
|
||||
),
|
||||
)
|
||||
|
||||
const output: Array<{
|
||||
name: string;
|
||||
value: number;
|
||||
range: string;
|
||||
unit: string;
|
||||
}> = JSON.parse(await Deno.readTextFile("output.txt"));
|
||||
name: string
|
||||
value: number
|
||||
range: string
|
||||
unit: string
|
||||
}> = JSON.parse(await Deno.readTextFile('output.txt'))
|
||||
|
||||
for (const resultKey of Object.keys(results.Cached) as Array<keyof typeof results.Cached>) {
|
||||
output.push({
|
||||
name: `[Cache Plugin] ${resultKey.toString()}`,
|
||||
value: results.Cached[resultKey].value,
|
||||
range: `${results.Cached[resultKey].min} … ${results.Cached[resultKey].max}`,
|
||||
unit: "MB",
|
||||
});
|
||||
unit: 'MB',
|
||||
})
|
||||
}
|
||||
|
||||
Deno.writeTextFile("output.txt", JSON.stringify(output, undefined, 2));
|
||||
Deno.writeTextFile('output.txt', JSON.stringify(output, undefined, 2))
|
||||
|
||||
Reference in New Issue
Block a user