Skip to content

Commit

Permalink
chore: restructure benchmarks (#2864)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Feb 27, 2024
1 parent 2091dcf commit 5600aa1
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench, group, run } from 'mitata'
import { getFieldValues } from '../lib/web/cache/util.js'
import { getFieldValues } from '../../lib/web/cache/util.js'

const values = [
'',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench, group, run } from 'mitata'
import { isCTLExcludingHtab } from '../lib/web/cookies/util.js'
import { isCTLExcludingHtab } from '../../lib/web/cookies/util.js'

const valid = 'Space=Cat; Secure; HttpOnly; Max-Age=2'
const invalid = 'Space=Cat; Secure; HttpOnly; Max-Age=2\x7F'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench, group, run } from 'mitata'
import { parseHeaders } from '../lib/core/util.js'
import { parseHeaders } from '../../lib/core/util.js'

const target = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench, group, run } from 'mitata'
import { parseRawHeaders } from '../lib/core/util.js'
import { parseRawHeaders } from '../../lib/core/util.js'

const rawHeadersMixed = ['key', 'value', Buffer.from('key'), Buffer.from('value')]
const rawHeadersOnlyStrings = ['key', 'value', 'key', 'value']
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench, group, run } from 'mitata'
import { tree } from '../lib/core/tree.js'
import { tree } from '../../lib/core/tree.js'

const contentLength = Buffer.from('Content-Length')
const contentLengthUpperCase = Buffer.from('Content-Length'.toUpperCase())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench, run } from 'mitata'
import { Headers } from '../lib/web/fetch/headers.js'
import { Headers } from '../../lib/web/fetch/headers.js'

const headers = new Headers(
[
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/headers.mjs → benchmarks/fetch/headers.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench, group, run } from 'mitata'
import { Headers } from '../lib/web/fetch/headers.js'
import { Headers } from '../../lib/web/fetch/headers.js'

const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
const charactersLength = characters.length
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench, group, run } from 'mitata'
import { isValidSubprotocol } from '../lib/web/websocket/util.js'
import { isValidSubprotocol } from '../../lib/web/websocket/util.js'

const valid = 'valid'
const invalid = 'invalid '
Expand Down

0 comments on commit 5600aa1

Please sign in to comment.