https://github.com/andreasmadsen/htmlparser-benchmark
Simple benchmark for diffrent htmlparsers using real-life data
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
Repository
Simple benchmark for diffrent htmlparsers using real-life data
Basic Info
Statistics
- Stars: 103
- Watchers: 1
- Forks: 17
- Open Issues: 1
- Releases: 0
Metadata Files
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
- Website: https://andreasmadsen.github.io/
- Twitter: andreas_madsen
- Repositories: 151
- Profile: https://github.com/AndreasMadsen
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
Top Committers
| Name | 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
Pull Request Labels
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
- Homepage: https://github.com/AndreasMadsen/htmlparser-benchmark
- License: MIT
-
Latest release: 1.1.3
published over 11 years ago
Rankings
Maintainers (1)
Dependencies
- 159 dependencies
- progress ^2.0.3 development
- async ^3.2.4
- summary ^2.1.0
- dependabot/fetch-metadata v1.3.2 composite
- actions/checkout v3 composite
- actions/setup-node v3.3.0 composite
- stefanzweifel/git-auto-commit-action v4.14.1 composite