/chronomunica

Experimental tool to time query executions for Comunica

Primary LanguagePythonMIT LicenseMIT

logo

Actions Status Python License: MIT Code style: black

Chronomunica is an experimental Python tool to measure query execution using Comunica. The tool uses a combination of a proxy server and subprocess calls to execute queries using specific query engine configurations and queries. Please note that Chronomunica is not intended for actual use, and should be treated with caution. If you want to actually run benchmarks, look into using jbr.js.

Currently, the tool will output:

  • Requested URLS using a proxy HTTP server between the query engine and the actual server, including request count and unique URL count.
  • Query results captured from the CLI output of the query engine, including result count, unique result count, result hash and result arrival times in nanoseconds for use in calculating, for example, the diefficiency metrics.
  • Unrecognised engine CLI output and the times of their capture, to help capture debug prints and other output that is not recognised as query results but could be useful for examining together with the results.
  • Start and end times and the total time taken in seconds, to help spot when a query execution takes unnecessarily long even with a timeout.
  • Errors from the query engine stderr or when another error occurs, to help inspect issues later.

Usage

The tool is not published anywhere and will not be published anywhere, so it can be set up by cloning the repository and installing the dependencies in a virtual environment. After that, creating a new experiment manifest is possible via:

python app.py --create .../path/to/manifest.json

The manifest can then be executed:

python app.py --experiment .../path/to/manifest.json

Manual configuration is always necessary, as is setting up the server to which requests are proxied.

Docker

There is a Dockerfile provided, which can be built:

docker build --network host --tag chronomunica:dev .

The file can then be used to run the utility:

docker run --network host chronomunica:dev --help

The Docker image used for the query engine can then be based on this one.

Issues

Please feel free to report any issues on the GitHub issue tracker, however do also note that this tool is not intendec for actual use and is more of an experiment in trying to get some timings out of Comunica without going over the top.