Skip to content

Commit

Permalink
Fix benchmark setup
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmod committed May 30, 2024
1 parent 4d0aa96 commit da38d32
Show file tree
Hide file tree
Showing 9 changed files with 21,675 additions and 10,753 deletions.
14,064 changes: 14,064 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/adblocker-benchmarks/.tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rust 1.56.0
4 changes: 2 additions & 2 deletions packages/adblocker-benchmarks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ adblockpluscore: ./node_modules/adblockpluscore ./node_modules/adblockpluscore/l
tsurlfilter-node: ./node_modules/@adguard/tsurlfilter

./node_modules/fast-hosts-lookup:
yarn add mjethani/fast-hosts-lookup#9136bb8c331ee5dba8ac1a0018552cace11e2afa
yarn add fast-hosts-lookup@https://github.com/mjethani/fast-hosts-lookup#9136bb8c331ee5dba8ac1a0018552cace11e2afa

fast-hosts-lookup: ./node_modules/fast-hosts-lookup

./node_modules/adblock-rs:
yarn add adblock-rs@0.3.15
yarn add adblock-rs@0.8.10

adblock-rs: ./node_modules/adblock-rs

Expand Down
2 changes: 1 addition & 1 deletion packages/adblocker-benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extracting hostnames and domains from URLs).

Install [Rust](https://www.rust-lang.org/tools/install) and [Node.js](https://nodejs.org/en/download/).

Run `npm install` to install the dependencies.
Run `yarn install --immutable` to install the dependencies.

Run `make` to start benchmarking.

Expand Down
2 changes: 1 addition & 1 deletion packages/adblocker-benchmarks/blockers/brave.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = class Brave {
}

serialize() {
return this.client.serializeCompressed();
return this.client.serializeRaw();
}

deserialize(serialized) {
Expand Down
2 changes: 1 addition & 1 deletion packages/adblocker-benchmarks/blockers/cliqz-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

const { FiltersEngine, Request } = require('@cliqz/adblocker/dist/adblocker.umd.min.js');
const { FiltersEngine, Request } = require('@cliqz/adblocker');

module.exports = class Cliqz {
static parse(rawLists, { enableCompression = false, debug = false } = {}) {
Expand Down
5 changes: 5 additions & 0 deletions packages/adblocker-benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
"url": "https://github.com/ghostery/adblocker/issues"
},
"dependencies": {
"@adguard/tsurlfilter": "0.7.26",
"@cliqz/adblocker": "^1.27.3",
"@gorhill/ubo-core": "0.1.14",
"adblock-rs": "0.8.10",
"adblockpluscore": "0.3.1",
"fast-hosts-lookup": "https://github.com/mjethani/fast-hosts-lookup#9136bb8c331ee5dba8ac1a0018552cace11e2afa",
"tldts-experimental": "^6.0.14"
},
"contributors": [
Expand Down
Loading

0 comments on commit da38d32

Please sign in to comment.