/stardog_sparql_profiler_tui

A TUI for profiling SPARQL queries in Stardog

Primary LanguagePython

Stardog SPARQL Profiler TUI

A textual user interface (TUI) for profiling SPARQL queries in Stardog.

image

Installation

Install sparql-profiler CLI tool to launch the TUI:

❯ pip3 install --editable .

Check installation:

❯ sparql-profiler --help
Usage: sparql-profiler [OPTIONS] [QUERY]

  Profiles the QUERY.

  If both the query_file option and QUERY argument are provided, the QUERY
  argument will take precedence.

  If token is provided in addition to a username and password for
  authentication, the token will take precedence.

Options:
  -u, --username TEXT        Stardog username (applicable only if token not
                             provided)  [default: admin]
  -p, --password TEXT        Stardog password (applicable only if token not
                             provided)  [default: admin]
  -t, --token TEXT           Auth JWT token (applicable only if username and
                             password are not provided)
  -e, --endpoint TEXT        Stardog endpoint  [default:
                             http://localhost:5820; required]
  -d, --database TEXT        Stardog database  [required]
  -r, --reasoning            Enables reasoning for the query to be profiled.
  -f, --query_file FILENAME  File containing query to profile
  -h, --help                 Show this message and exit.

In Action

demo.mov

Usage

❯ sparql-profiler --help
Usage: sparql-profiler [OPTIONS] [QUERY]

  Profiles the QUERY.

  If both the query-file option and QUERY argument are provided, the QUERY argument
  will take precedence.

  If token is provided in addition to a username and password for
  authentication, the token will take precedence.

Options:
  -u, --username TEXT        Stardog username (applicable only if token not
                             provided)  [default: admin]
  -p, --password TEXT        Stardog password (applicable only if token not
                             provided)  [default: admin]
  -t, --token TEXT           Auth JWT token (applicable only if username and
                             password are not provided)
  -e, --endpoint TEXT        Stardog endpoint  [default:
                             http://localhost:5820; required]
  -d, --database TEXT        Stardog database  [required]
  -r, --reasoning            Enables reasoning for the query to be profiled.
  -f, --query_file FILENAME  File containing query to profile
  -h, --help                 Show this message and exit.