Huge performance improvement through better queue system.
This commit is contained in:
@ -30,13 +30,13 @@ async function benchmark(
|
||||
Promise.resolve().then(async () => {
|
||||
const largeText = "hallowelt!".repeat(250);
|
||||
|
||||
const lg = new LoggingBase({
|
||||
console: false,
|
||||
});
|
||||
const fs = new FileAdapter("logs/benchmark", Number.MAX_SAFE_INTEGER);
|
||||
await lg.addAdapter(fs);
|
||||
|
||||
await benchmark("large data", 100000, async (cnt) => {
|
||||
const lg = new LoggingBase({
|
||||
console: false,
|
||||
});
|
||||
const fs = new FileAdapter("logs/benchmark", Number.MAX_SAFE_INTEGER);
|
||||
await lg.addAdapter(fs);
|
||||
|
||||
console.time("Logging");
|
||||
for (let i = 0; i < cnt; i++) {
|
||||
lg.log(largeText);
|
||||
@ -46,5 +46,6 @@ Promise.resolve().then(async () => {
|
||||
await fs.close();
|
||||
await lg.close();
|
||||
});
|
||||
|
||||
console.table(results);
|
||||
});
|
||||
|
Reference in New Issue
Block a user