You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`sysbench` is a very simple, lightweight, and easy-to-customize benchmarking tool. I've been using `sysbench` for many years. In most cases, it met my requirements and worked well.
9
+
But I needed to do more complex and fundamental customization, such as adding drivers. So I decided to make a `sysbench` clone in Golang.
10
+
11
+
`go-sysbench` runs the same SQL as sysbench and reports the results in the same format as `sysbench`.
12
+
`go-sysbench` cannot do as many things as sysbench, but it offers more customizability for those who are familiar with Golang.
13
+
14
+
15
+
I would like to thank Peter Zaitsev, Alexy Kopytov and contributors for inventing great tool [sysbench](https://github.com/akopytov/sysbench).
4
16
5
17
## How to install
6
18
7
-
# Incompatibility with sysbench
19
+
```
20
+
go install github.com/samitani/go-sysbench/cmd/go-sysbench@main
21
+
```
22
+
23
+
## Incompatibility with sysbench
8
24
9
-
## Few options
25
+
*`go-sysbench` supports only `oltp_read_only` and `oltp_read_write` database benchmarks. Linux benchmarks such as `fileio`, `cpu`, `memory`, etc. are not supported.
26
+
* Some options are not implemented. `go-sysbench oltp_read_write run --help` shows available options.
27
+
```
28
+
$ go-sysbench oltp_read_write run --help
29
+
2025/02/05 22:55:07 Usage:
30
+
go-sysbench [OPTIONS] oltp_read_write run [run-OPTIONS]
10
31
11
-
## Number of reconnects is not supported
32
+
Help Options:
33
+
-h, --help Show this help message
12
34
13
-
## Lua script is not supported
35
+
[run command options]
36
+
--threads= number of threads to use (default: 1)
37
+
--events= limit for total number of events (default: 0)
38
+
--time= limit for total execution time in seconds (default: 10)
39
+
--report-interval= periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports (default: 0)
40
+
--histogram=[on|off] print latency histogram in report (default: off)
41
+
--percentile= percentile to calculate in latency statistics (1-100) (default: 95)
42
+
--tables= number of tables (default: 1)
43
+
--table_size= number of rows per table (default: 10000)
44
+
--db-driver=[mysql|pgsql|spanner] specifies database driver to use (default: mysql)
45
+
--mysql-host= MySQL server host (default: localhost)
46
+
--mysql-port= MySQL server port (default: 3306)
47
+
--mysql-user= MySQL user (default: sbtest)
48
+
--mysql-password= MySQL password [$MYSQL_PWD]
49
+
--mysql-db= MySQL database name (default: sbtest)
50
+
--mysql-ssl=[on|off] use SSL connections (default: off)
51
+
--pgsql-host= PostgreSQL server host (default: localhost)
52
+
--pgsql-port= PostgreSQL server port (default: 5432)
0 commit comments