https://github.com/noahgorstein/stardog_sparql_profiler_tui
A TUI for profiling SPARQL queries in Stardog
https://github.com/noahgorstein/stardog_sparql_profiler_tui
Last synced: over 1 year ago
JSON representation
A TUI for profiling SPARQL queries in Stardog
- Host: GitHub
- URL: https://github.com/noahgorstein/stardog_sparql_profiler_tui
- Owner: noahgorstein
- Created: 2023-06-10T03:20:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-15T03:27:27.000Z (almost 3 years ago)
- Last Synced: 2025-01-31T23:46:03.812Z (over 1 year ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stardog SPARQL Profiler TUI
A textual user interface (TUI) for [profiling SPARQL queries in Stardog](https://docs.stardog.com/operating-stardog/database-administration/managing-query-performance#sparql-profiler).

## 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
https://github.com/noahgorstein/stardog_sparql_profiler_tui/assets/23270779/f6147240-35ca-45a5-8fe2-cbc378d44b11
## Usage
```text
❯ 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.
```