-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle errors in node:http better (#12641)
Co-authored-by: Jarred-Sumner <[email protected]>
- Loading branch information
1 parent
d547d8a
commit e5ac4f9
Showing
10 changed files
with
577 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { run, bench } from "mitata"; | ||
import { createRequire } from "module"; | ||
|
||
const require = createRequire(import.meta.url); | ||
const db = require("better-sqlite3")("./src/northwind.sqlite"); | ||
|
||
{ | ||
const sql = db.prepare(`SELECT * FROM "Order"`); | ||
|
||
bench('SELECT * FROM "Order"', () => { | ||
sql.all(); | ||
}); | ||
} | ||
|
||
{ | ||
const sql = db.prepare(`SELECT * FROM "Product"`); | ||
|
||
bench('SELECT * FROM "Product"', () => { | ||
sql.all(); | ||
}); | ||
} | ||
|
||
{ | ||
const sql = db.prepare(`SELECT * FROM "OrderDetail"`); | ||
|
||
bench('SELECT * FROM "OrderDetail"', () => { | ||
sql.all(); | ||
}); | ||
} | ||
|
||
await run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.