qbench

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 14 Imported by: 0

README

qbench

build Go Report Card Codecov Scc Count

A small portable utility to benchmark the performance of SQL queries. Like ab (ApacheBench) for SQL world.

Supported Databases

Currently supported databases are:

  • MySQL/MariaDB
  • SQLite

Usage

Perform 1000 iterations of the query and print the results:

qbench -c 1000 -d testdb -e "SELECT * FROM users"

Output may look like this:

Connection: admin@127.0.0.1:3306/testdb
Query: SELECT * FROM users

Running 1000 queries with concurrency 1...

---- Benchmark Results ----
Total time:        1.55 sec
Complete requests: 1000
Failed requests:   0
Requests/sec:      644.60
Fetched rows:      301000
Rows/query:        301
Fetched data:      18435000 bytes
Bytes/query:       18435
Average latency:   1.53 ms
P95 latency:       1.93 ms
P99 latency:       2.33 ms

Installation

If you have Go toolchain installed, you can use the following command to install the utility:

go install github.com/sibprogrammer/qbench@latest

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