mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-31 04:04:24 +01:00
hydrate.bench: move the events variable above the bench
This commit is contained in:
@@ -4,12 +4,10 @@ import { jsonlEvents } from '@/test.ts';
|
||||
const testEvents = await jsonlEvents('fixtures/hydrated.jsonl');
|
||||
const testStats = JSON.parse(await Deno.readTextFile('fixtures/stats.json'));
|
||||
|
||||
Deno.bench('assembleEvents with home feed', (b) => {
|
||||
// The first 20 events in this file are my home feed.
|
||||
// The rest are events that would be hydrated by the store.
|
||||
const events = testEvents.slice(0, 20);
|
||||
|
||||
b.start();
|
||||
// The first 20 events in this file are my home feed.
|
||||
// The rest are events that would be hydrated by the store.
|
||||
const events = testEvents.slice(0, 20);
|
||||
|
||||
Deno.bench('assembleEvents with home feed', () => {
|
||||
assembleEvents(events, testEvents, testStats);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user