https://github.com/nikoksr/dbench
A wrapper around pgbench that provides additional feature like result persistence and plotting.
https://github.com/nikoksr/dbench
Last synced: over 1 year ago
JSON representation
A wrapper around pgbench that provides additional feature like result persistence and plotting.
- Host: GitHub
- URL: https://github.com/nikoksr/dbench
- Owner: nikoksr
- License: mit
- Created: 2023-11-08T12:04:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-10T22:05:50.000Z (over 2 years ago)
- Last Synced: 2024-10-06T05:41:28.110Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 218 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
dbench
A nifty wrapper around pgbench that comes with plotting and result management.
[](https://pkg.go.dev/github.com/nikoksr/dbench)
## About
`dbench` is a convenient wrapper around `pgbench` that enhances your benchmarking experience with features like result
management and plotting. It's designed to make it easy to run, manage, and visualize your PostgreSQL benchmarks.
## Installation
> Important: While the releases offer binaries for multiple platforms and architectures, only Linux is tested. If you
> are using a different OS, I do not guarantee that dbench will work as expected.
Download one of the [releases](https://github.com/nikoksr/dbench/releases) for your system, or install using the
provided [install script](scripts/install.sh):
```sh
curl -fsSL https://tinyurl.com/install-dbench | bash
```
## Prerequisites
`dbench` requires `pgbench` and `gnuplot` to be installed on your system. You can check if they are installed and their
versions using the `dbench doctor` command.
## Usage
> Note: To enhance security, dbench does not offer a password flag. Instead, you have two options: either set the
> PGPASSWORD environment variable, or input your password when prompted. dbench will subsequently use the PGPASSWORD
> environment variable in its sub-processes.
To use `dbench`, you first need to initialize a PostgreSQL Database. Remember to adjust the connection parameters to
your needs.
```bash
dbench init --db-name=postgres --db-user=postgres --db-host=localhost --db-port=5432 --scale 10
```
Then, you can run your first array of benchmarks.
```bash
dbench run --db-name=postgres --db-user=postgres --db-host=localhost --db-port=5432
```
Afterward, you can plot the results.
```bash
dbench plot
```
To see all available commands and flags, run `dbench --help`.