Skip to content

Commit

Permalink
chore: update benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
xusd320 committed Jul 22, 2024
1 parent 0b9043a commit 77ec1b3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions benchmark/benchmark.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import cheerio from "./cheerio.mjs";
import niddle from "./niddle.mjs";
import cheerioParse5 from "./cheerio-parse5.mjs";
import cheerioHtmlParser2 from "./cheerio-htmlparser2.mjs";

async function main() {
await niddle();
await cheerio();
await cheerioParse5();
await cheerioHtmlParser2();
}

Expand Down
2 changes: 1 addition & 1 deletion benchmark/cheerio.mjs → benchmark/cheerio-parse5.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function cheerio() {

bench.on("result", function (stat) {
console.log(
"cheerio :" +
"cheerio-parse5 :" +
stat.mean().toPrecision(6) +
" ms/file ± " +
stat.sd().toPrecision(6),
Expand Down
7 changes: 0 additions & 7 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,3 @@ export declare class NodeRepr {
/** Clone this node to a new instance, including its all descendants. */
cloneRecursive(): NodeRepr
}
export declare interface NodeRepr {
/** The node object, cann't be instantiated in javascript. So call the constructor will throw an error */
constructor(): void;
select(selectors: "html"): NodeRepr;
select(selectors: "head"): NodeRepr;
select(selectors: "body"): NodeRepr;
}

0 comments on commit 77ec1b3

Please sign in to comment.