https://github.com/andreasmadsen/htmlparser-benchmark

Simple benchmark for diffrent htmlparsers using real-life data

https://github.com/andreasmadsen/htmlparser-benchmark

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.1%) to scientific vocabulary

Keywords from Contributors

deep-neural-networks labels
Last synced: 10 months ago · JSON representation

Repository

Simple benchmark for diffrent htmlparsers using real-life data

Basic Info
  • Host: GitHub
  • Owner: AndreasMadsen
  • License: mit
  • Language: HTML
  • Default Branch: master
  • Homepage:
  • Size: 4.7 MB
Statistics
  • Stars: 103
  • Watchers: 1
  • Forks: 17
  • Open Issues: 1
  • Releases: 0
Created almost 13 years ago · Last pushed 11 months ago
Metadata Files
Readme License

README.md

htmlparser-benchmark

Simple benchmark for different htmlparsers using real-life data

What is this good for?

Don't use a particular parser just because it shows good results in this benchmark. Instead, this benchmark is best for comparing changes between individual versions of parsers, as well as for parser authors to see how much room for improvement there is.

Even though all libraries included in this benchmark parse something HTML-like, most don't fully follow the HTML spec. As of August 2021, parse5 is the only fully spec compliant HTML parser available for NodeJS. If you are okay with slightly different results, have a look at the libraries benchmarked here and pick the one with the ideal trade-offs for your scenario.

Installation

shell npm install htmlparser-benchmark

How to run

Use as a module

```javascript const Benchmark = require('htmlparser-benchmark'); const { Parser } = require('htmlparser2');

const bench = new Benchmark((html, callback) => { const parser = new Parser({ onend: callback, onerror: callback, }); parser.end(html); });

bench.on('progress', (key) => { console.log(finished parsing ${key}.html); });

bench.on('result', (stat) => { console.log( ${stat.mean().toPrecision(6)} ms/file ± ${stat.sd().toPrecision(6)}, ); }); ```

Where stat is a Summary object.

Use the script

You can also just run npm test, that will benchmark all the modules listed in the wrapper directory. Note that you will need to install the dev-dependencies first.

shell cd htmlparser-benchmark npm install npm test

License

The software is license under "MIT"

Copyright (c) 2013 Andreas Madsen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Owner

  • Name: Andreas Madsen
  • Login: AndreasMadsen
  • Kind: user
  • Location: Copenhagen, Denmark
  • Company: MILA

Researching interpretability for Machine Learning because society needs it.

GitHub Events

Total
  • Watch event: 12
  • Delete event: 29
  • Issue comment event: 1
  • Push event: 27
  • Pull request event: 43
  • Fork event: 3
  • Create event: 27
Last Year
  • Watch event: 12
  • Delete event: 29
  • Issue comment event: 1
  • Push event: 27
  • Pull request event: 43
  • Fork event: 3
  • Create event: 27

Committers

Last synced: about 3 years ago

All Time
  • Total Commits: 148
  • Total Committers: 12
  • Avg Commits per committer: 12.333
  • Development Distribution Score (DDS): 0.365
Past Year
  • Commits: 58
  • Committers: 3
  • Avg Commits per committer: 19.333
  • Development Distribution Score (DDS): 0.155
Top Committers
Name Email Commits
dependabot[bot] 4****]@u****m 94
Felix Böhm me@f****m 17
Felix Böhm 1****5@u****m 12
fb55 f****5@u****m 9
Andreas Madsen a****k@g****m 7
Munawwar m****z@h****m 2
AndreasMadsen A****n@u****m 2
Batuhan Karaca 4****r@u****m 1
Dirk Holtwick h****k@u****m 1
Rafael Hengles r****l@h****t 1
acrazing j****g@g****m 1
Timo 3****1@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 198
  • Average time to close issues: N/A
  • Average time to close pull requests: 10 days
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.2
  • Merged pull requests: 154
  • Bot issues: 0
  • Bot pull requests: 197
Past Year
  • Issues: 0
  • Pull requests: 37
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.05
  • Merged pull requests: 31
  • Bot issues: 0
  • Bot pull requests: 37
Top Authors
Issue Authors
  • dependabot[bot] (1)
Pull Request Authors
  • dependabot[bot] (217)
  • monochromer (2)
Top Labels
Issue Labels
dependencies (1) javascript (1)
Pull Request Labels
dependencies (215) javascript (153) github_actions (62)

Packages

  • Total packages: 1
  • Total downloads:
    • npm 2,549 last-month
  • Total dependent packages: 21
  • Total dependent repositories: 152
  • Total versions: 5
  • Total maintainers: 1
npmjs.org: htmlparser-benchmark

Simple benchmark for htmlparser2 using real-life data

  • Versions: 5
  • Dependent Packages: 21
  • Dependent Repositories: 152
  • Downloads: 2,549 Last month
Rankings
Dependent packages count: 1.1%
Dependent repos count: 1.2%
Average: 5.1%
Stargazers count: 5.2%
Forks count: 6.0%
Downloads: 12.0%
Maintainers (1)
Last synced: 11 months ago

Dependencies

package-lock.json npm
  • 159 dependencies
package.json npm
  • progress ^2.0.3 development
  • async ^3.2.4
  • summary ^2.1.0
.github/workflows/dependabot-automerge.yml actions
  • dependabot/fetch-metadata v1.3.2 composite
.github/workflows/nodejs-benchmark.yml actions
  • actions/checkout v3 composite
  • actions/setup-node v3.3.0 composite
  • stefanzweifel/git-auto-commit-action v4.14.1 composite