sd-utils
is a command line application containing a variety of tools for working with Stardog.
Clone this repo, build from source with cd sd-utils && go build
, then move the binary to somewhere accessible in your PATH
, e.g. mv ./sd-utils /usr/local/bin
.
Execute a SPARQL select query concurrently to benchmark server response times.
Usage: sd-utils bench-select --database=STRING --server=STRING --query=STRING --file=FILE --concurrent-queries=INT
execute a SPARQL select query concurrently to benchmark server response times
Flags:
-h, --help Show context-sensitive help.
-u, --username=STRING Stardog username. To be used instead in conjunction with password instead of token ($SD_USERNAME).
-p, --password=STRING Stardog password. To be used instead in conjunction with username instead of token ($SD_PASSWORD).
--token=STRING JWT token to use for authentication. To be used instead of username and password ($SD_TOKEN).
-d, --database=STRING Database to execute queries against ($SD_DATABASE).
-s, --server=STRING URL of the Stardog server ($SD_SERVER).
-t, --timeout=INT Timeout in milliseconds for the provided query.
-r, --reasoning Enable reasoning for the provided query.
-c, --concurrent-queries=INT Number of concurrent queries to execute.
--format="table" Result format of benchmark results. Valid formats are 'table' or 'csv'.
--print-query Print the query executed before the results.
Query Flags
-q, --query=STRING Name of stored query or query string to execute.
-f, --file=FILE File containing the query to execute.
# environment variables can be used to set some defaults
export SD_USERNAME=admin
export SD_PASSWORD=admin
export SD_SERVER=http://localhost:5820
export SD_DATABASE=myDatabase
sd-utils bench-select -c 5 -q "SELECT * { ?s a ?p } LIMIT 10"