https://github.com/comunica/sparql-benchmark-runner.js
🏋 Executes a query set against a given SPARQL endpoint
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 (9.9%) to scientific vocabulary
Keywords from Contributors
Repository
🏋 Executes a query set against a given SPARQL endpoint
Basic Info
- Host: GitHub
- Owner: comunica
- License: other
- Language: TypeScript
- Default Branch: master
- Size: 180 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
SPARQL Benchmark Runner
This is a simple tool to run a query set against a given SPARQL endpoint, and measure its execution time.
Concretely, the query set is a directory containing any number of files, where each file contains a number of SPARQL queries seperated by empty lines.
Example directory of a query set:
text
watdiv-10M/
C1.txt
C2.txt
C3.txt
F1.txt
...
Example contents of C1.txt:
```sparql
SELECT * WHERE {
?v0 http://schema.org/caption ?v1 .
?v0 http://schema.org/text ?v2 .
}
SELECT * WHERE { ?v0 http://schema.org/caption ?v1 . ?v0 http://schema.org/text ?v2 . }
SELECT * WHERE { ?v0 http://schema.org/caption ?v1 . ?v0 http://schema.org/text ?v2 . } ```
By default, it generates CSV output in a form similar to:
csv
name;id;error;errorDescription;failures;hash;replication;results;resultsMax;resultsMin;time;timeMax;timeMin;times;timestamps;timestampsMax;timestampsMin;timestampsStd;timeStd;timestampsAll
C1;0;false;;0;6e0f167d2eb0e61af0673275ee8f935f;5;5;5;5;25.8;33;20;28 33 26 22 20;25.4 25.4 25.4 25.4 25.4;32 32 32 32 32;20 20 20 20 20;4.176122603564219 4.176122603564219 4.176122603564219 4.176122603564219 4.176122603564219;4.578209256903839;"[[32, 32, 32, 32, 32],[20, 20, 20, 20, 20], [21, 21, 21, 21, 21], [30, 30, 30, 30, 30], [26, 26, 26, 26, 26]]"
C1;1;false;;0;3e279701df97583c2f296ac0c2e5b877;5;5;5;5;38.6;90;20;27 28 28 20 90;38.4 38.4 38.6 38.6 38.6;89 89 90 90 90;20 20 20 20 20;25.476263462289754 25.476263462289754 25.873538606073968 25.873538606073968 25.873538606073968;25.873538606073968;"[[38.4, 38.4, 38.6, 38.6, 38.6],[50, 50, 51, 52, 53.3], [20, 20, 20, 20, 20], [89, 89, 90, 90, 90], [66, 76, 76, 76, 77]]"
C1;2;false;;0;4783aeaa4ce9950eafd3a623e1a537f6;5;5;5;5;35.8;80;20;28 26 80 20 25;35.8 35.8 35.8 35.8 35.8;80 80 80 80 80;20 20 20 20 20;22.25668438918969 22.25668438918969 22.25668438918969 22.25668438918969 22.25668438918969;22.25668438918969;"[[35.4, 35.4, 35.6, 35.6, 35.6],[50, 50, 51, 52, 53.3], [20, 20, 20, 20, 20], [80, 80, 80, 80, 80], [66, 76, 76, 76, 77]]"
Installation
bash
npm install sparql-benchmark-runner
Usage
sparql-benchmark-runner can be used from the CLI with the the following options.
Options:
--version Show version number [boolean]
--endpoint URL of the SPARQL endpoint to send queries to
[string] [required]
--queries Directory of the queries [string] [required]
--replication Number of replication runs [number] [default: 5]
--warmup Number of warmup runs [number] [default: 1]
--output Destination for the output CSV file
[string] [default: "./output.csv"]
--timeout Timeout value in seconds to use for individual queries [number]
----help
An example input is the following.
bash
sparql-benchmark-runner \
--endpoint http://example.org/sparql \
--queries ./watdiv-10M/ \
--output ./output.csv \
--replication 5 \
--warmup 1
When used as a JavaScript library, the runner can be configured with different query loaders,
result aggregators and result serializers to accommodate special use cases.
By default, when no specific result aggregator is provided,
the runner uses ResultAggregatorComunica that handles basic aggregation,
as well as the httpRequests metadata field from a Comunica SPARQL endpoint, if such metadata is provided.
```javascript import { SparqlBenchmarkRunner, ResultSerializerCsv, ResultAggregatorComunica, QueryLoaderFile, } from 'sparql-benchmark-runner';
async function executeQueries(pathToQueries, pathToOutputCsv) { const queryLoader = new QueryLoaderFile(pathToQueries); const resultSerializer = new ResultSerializerCsv(); const resultAggregator = new ResultAggregatorComunica();
const querySets = await queryLoader.loadQueries();
const runner = new SparqlBenchmarkRunner({ endpoint: 'https://localhost:8080/sparql', querySets, replication: 4, warmup: 1, timeout: 60000, availabilityCheckTimeout: 1000, logger: (message) => console.log(message), resultAggregator, });
const results = await runner.run();
await resultSerializer.serialize(path, results); } ```
Docker
This tool is also available as a Docker image:
bash
touch output.csv
docker run \
--rm \
--interactive \
--tty \
--volume $(pwd)/output.csv:/output.csv \
--volume $(pwd)/queries:/queries \
comunica/sparql-benchmark-runner \
--endpoint https://dbpedia.org/sparql \
--queries /queries \
--output /output.csv \
--replication 5 \
--warmup 1
License
This code is copyrighted by Ghent University – imec and released under the MIT license.
Owner
- Name: Comunica
- Login: comunica
- Kind: organization
- Location: Ghent, Belgium
- Website: https://comunica.dev
- Twitter: comunicajs
- Repositories: 69
- Profile: https://github.com/comunica
Flexible SPARQL and GraphQL over decentralized RDF on the Web.
GitHub Events
Total
- Issue comment event: 3
- Push event: 5
- Pull request review event: 13
- Pull request review comment event: 12
- Pull request event: 2
- Fork event: 1
- Create event: 2
Last Year
- Issue comment event: 3
- Push event: 5
- Pull request review event: 13
- Pull request review comment event: 12
- Pull request event: 2
- Fork event: 1
- Create event: 2
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Ruben Taelman | r****n@u****e | 66 |
| surilindur | s****r | 14 |
| RubenEschauzier | 6****r | 2 |
| Joachim Van Herwegen | j****h@g****m | 2 |
| constraintAutomaton | c****n@p****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 13
- Average time to close issues: N/A
- Average time to close pull requests: about 1 month
- Total issue authors: 0
- Total pull request authors: 5
- Average comments per issue: 0
- Average comments per pull request: 3.23
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 0
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 4.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- surilindur (14)
- RubenEschauzier (4)
- constraintAutomaton (2)
- dependabot[bot] (1)
- joachimvh (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 1,248 last-month
- Total dependent packages: 3
- Total dependent repositories: 2
- Total versions: 29
- Total maintainers: 1
npmjs.org: sparql-benchmark-runner
Executes a query set against a given SPARQL endpoint
- Homepage: https://github.com/comunica/sparql-benchmark-runner.js#readme
- License: MIT
-
Latest release: 5.0.0
published over 1 year ago
Rankings
Maintainers (1)
Funding
- type: opencollective
- url: https://opencollective.com/comunica-association
Dependencies
- @rubensworks/eslint-config ^1.0.1 development
- @types/jest ^26.0.0 development
- @types/node ^14.14.7 development
- @typescript-eslint/eslint-plugin ^4.2.0 development
- @typescript-eslint/parser ^4.1.1 development
- coveralls ^3.0.0 development
- eslint ^7.9.0 development
- eslint-config-es ^3.23.0 development
- eslint-import-resolver-typescript ^2.3.0 development
- eslint-plugin-import ^2.22.0 development
- eslint-plugin-jest ^24.0.2 development
- eslint-plugin-tsdoc ^0.2.7 development
- eslint-plugin-unused-imports ^0.1.3 development
- fs-extra ^9.0.0 development
- husky ^4.2.5 development
- jest ^26.6.3 development
- jest-extended ^0.11.2 development
- manual-git-changelog ^1.0.1 development
- streamify-array ^1.0.1 development
- ts-jest ^26.4.3 development
- typescript ^4.2.4 development
- @types/yargs ^16.0.1
- fetch-sparql-endpoint ^3.1.0
- yargs ^16.2.0
- 850 dependencies
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/setup-node v2 composite
- coverallsapp/github-action master composite
- node lts build
- node lts-alpine build