Giter VIP home page Giter VIP logo

selectosaur's Introduction

Selectosaur

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

Wrote it as part of my job application at TimescaleDB.

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/MacOS, 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:[email protected]:31703/tsdb?sslmode=require"

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

    Total number of queries run:      200
    Number of failures:               0
    Total time across all queries:    329.820000 ms
    Average query time:               1.649100 ms
    Minimum query time:               1.349000 ms
    Maximum query time:               2.998000 ms
    Median query time:                1.462000 ms

Result

They liked my assignment but I got turned down after subsequent interviews :/

selectosaur's People

Contributors

duaraghav8 avatar

Stargazers

MS avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.