Giter Site home page Giter Site logo

pg-bench's Introduction

PostgreSQL Benchmark

A simple tool to benchmark PostgreSQL queries.

Getting Started

These instructions will guide you on how to set up and run the project on your local machine.

Prerequisites

To run this project, you will need the following tools:

Build and Run

Getting the sources

First, Clone this repository locally:

git clone https://github.com/marcelohmariano/pg-bench

Build

Build the benchmark binary:

cd pg-bench
make all

The command above will generate the binary at ./bin/pg-bench.

Run

You can run the benchmark binary like so:

./bin/pg-bench -u "<user>:<pass>@<host>:<port>/<dbname>" -f <sql_file>

After running it, you should see an output similar to this:

Statements:
  Total: 200
  Succeeded: 200
  Failed: 0

Durations:
  Min: 66.114373ms
  Max: 242.215678ms
  Average: 158.03909ms
  Median: 145.065445ms
  Overall: 2.730135061s

Testing

You can run the tests by running the make test from a terminal.

Linting

This project uses golangci-lint for linting Go source files. You can run the linters by running make lint from a terminal.

pg-bench's People

Contributors

marcelohmariano avatar

Stargazers

Bárbara Okubo avatar Andre Bossi avatar

Watchers

 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.