npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@jbr-experiment/bsbm

v5.4.0

Published

BSBM experiment handler for JBR

Downloads

1,524

Readme

JBR Experiment - BSBM

Build status Coverage Status npm version

A jbr experiment type for the Berlin SPARQL Benchmark (BSBM).

Requirements

  • Node.js (1.12 or higher)
  • Docker (required for invoking WatDiv Docker)
  • jbr (required for initializing, preparing, and running experiments on the command line)

Quick start

1. Install jbr

jbr is a command line tool that enables experiments to be initialized, prepared, and started. It can be installed from the npm registry:

$ npm install -g jbr

or

$ yarn global add jbr

2. Initialize a new experiment

Using the jbr CLI tool, initialize a new experiment:

$ jbr init watdiv my-experiment
$ cd my-experiment

This will create a new my-experiment directory with default configs for this experiment type.

3. Configure the required hooks

This experiment type requires you to configure a certain SPARQL endpoint to send queries to for the hookSparqlEndpoint. A value for this hook can be set as follows, such as sparql-endpoint-comunica:

$ jbr set-hook hookSparqlEndpoint sparql-endpoint-comunica

4. Prepare the experiment

In order to run all preprocessing steps, such as creating all required datasets, invoke the prepare step:

$ jbr prepare

All prepared files will be contained in the generated/ directory:

generated/
  dataset.hdt
  dataset.hdt.index.v1-1
  dataset.nt
  td_data/

5. Run the experiment

Once the experiment has been fully configured and prepared, you can run it:

$ jbr run

Once the run step completes, results will be present in the output/ directory.

Output

The following output is generated after an experiment has run.

output/bsbm.xml:

<?xml version="1.0"?><bsbm>
    <querymix>
        <scalefactor>100</scalefactor>
        <warmups>10</warmups>
        <seed>9834533</seed>
        <querymixruns>10</querymixruns>
        <minquerymixruntime>1.9948</minquerymixruntime>
        <maxquerymixruntime>3.5679</maxquerymixruntime>
        <totalruntime>23.993</totalruntime>
        <qmph>1500.46</qmph>
        <cqet>2.39926</cqet>
        <cqetg>2.35945</cqetg>
    </querymix>
    <queries>
        <query nr="1">
            <executecount>10</executecount>
            <aqet>0.007408</aqet>
            <aqetg>0.006883</aqetg>
            <qps>135.00</qps>
            <minqet>0.00484910</minqet>
            <maxqet>0.01610740</maxqet>
            <avgresults>0.10</avgresults>
            <minresults>0</minresults>
            <maxresults>1</maxresults>
            <timeoutcount>0</timeoutcount>
        </query>
    </queries>
</bsbm>

More output can be found in output/logs/bsbm-run.txt

Configuration

The default generated configuration file (jbr-experiment.json) for this experiment looks as follows:

{
  "@context": [
    "https://linkedsoftwaredependencies.org/bundles/npm/jbr/^5.0.0/components/context.jsonld",
    "https://linkedsoftwaredependencies.org/bundles/npm/@jbr-experiment/bsbm/^5.0.0/components/context.jsonld"
  ],
  "@id": "urn:jrb:test-bsbm",
  "@type": "ExperimentBsbm",
  "productCount": 1000,
  "generateHdt": true,
  "endpointUrl": "http://localhost:3001/sparql",
  "endpointUrlExternal": "http://localhost:3001/sparql",
  "warmupRuns": 5,
  "runs": 50,
  "hookSparqlEndpoint": {
    "@id": "urn:jrb:test-watdiv:hookSparqlEndpoint",
    "@type": "HookNonConfigured"
  }
}

Any config changes require re-running the prepare step.

More background information on these config options can be found in the README of WatDiv Docker.

Configuration fields

  • productCount: The number of products in the dataset. 91 products make about 50K triples. Defaults to 1000.
  • generateHdt: If a dataset.hdt should also be generated.
  • endpointUrl: URL through which the SPARQL endpoint of the hookSparqlEndpoint hook will be exposed from within the Docker container. When the endpoint is hosted on your main machine outside of Docker, this will be something like http://host.docker.internal:3001/sparql.
  • endpointUrlExternal: URL through which the SPARQL endpoint of the hookSparqlEndpoint hook will be exposed. This will be used for waiting until the endpoint is available.
  • warmupRuns: Number of warmup runs.
  • runs: Number of actual query runs.

License

jbr.js is written by Ruben Taelman.

This code is copyrighted by Ghent University – imec and released under the MIT license.