selectosaur

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 10 Imported by: 0

README

Selectosaur

Selectosaur is a CLI tool. It runs SQL queries on Timescale DB based on user-supplied parameters and outputs stats for them.

Build

It is recommended that you build this app on a 64-bit Mac or Linux machine with Golang version 1.17.

  1. Clone this repo on to your system
  2. Navigate to the root directory of this project and run go build to generate the binary. Alternatively, download a binary suitable for your platform from the Releases page.
  3. Ensure that the binary has execution permissions on your system. For Linux/MaxOS, you can run chmod +x ./selectosaur.
  4. Test the binary by invoking ./selectosaur -h. This should display the main help message of the CLI.

Run

  1. Ensure that your query params CSV file query_params.csv is in the same directory as the CLI.
  2. Run the below commands:
# NOTE: this is a temp timescale DB cluster which will be taken down soon. Enjoy for now.
export DB_CONNECTION_STRING="postgres://tsdbadmin:ha43nao4zo8ssg17@ixseujmyj1.rmdomcteja.tsdb.cloud.timescale.com:31703/tsdb?sslmode=require"

$ ./selectosaur --qp query_params.csv --worker-count 10

    Total number of queries run:      49
    Number of failures:               0
    Total time across all queries:    86.034000 ms
    Average query time:               1.755796 ms
    Minimum query time:               1.397000 ms
    Maximum query time:               3.270000 ms
    Median query time:                1.502000 ms

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL