Skip to content

Commit

Permalink
Generate cookie outside benchmarks (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Oct 10, 2024
1 parent c69cef6 commit bc66a7e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/parse.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ describe("parse", () => {
cookie.parse('foo="foo bar"');
});

const duplicates = genCookies(2) + "; " + genCookies(2);
bench("duplicates", () => {
cookie.parse(genCookies(2) + "; " + genCookies(2));
cookie.parse(duplicates);
});

const cookies10 = genCookies(10);
bench("10 cookies", () => {
cookie.parse(genCookies(10));
cookie.parse(cookies10);
});

const cookies100 = genCookies(100);
bench("100 cookies", () => {
cookie.parse(genCookies(100));
cookie.parse(cookies100);
});
});

Expand Down

0 comments on commit bc66a7e

Please # to comment.