All Projects → golang-design → bench

golang-design / bench

Licence: GPL-3.0 license
⏱️ Reliable performance measurement for Go programs. All in one design.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to bench

benchdiff
No description or website provided.
Stars: ✭ 41 (+24.24%)
Mutual labels:  benchmark, benchstat
Gatling Dubbo
A gatling plugin for running load tests on Apache Dubbo(https://github.com/apache/incubator-dubbo) and other java ecosystem.
Stars: ✭ 131 (+296.97%)
Mutual labels:  benchmarking, benchmark
Ezfio
Simple NVME/SAS/SATA SSD test framework for Linux and Windows
Stars: ✭ 91 (+175.76%)
Mutual labels:  benchmarking, benchmark
Scalajs Benchmark
Benchmarks: write in Scala or JS, run in your browser. Live demo:
Stars: ✭ 63 (+90.91%)
Mutual labels:  benchmarking, benchmark
php-orm-benchmark
The benchmark to compare performance of PHP ORM solutions.
Stars: ✭ 82 (+148.48%)
Mutual labels:  benchmarking, benchmark
Jsperf.com
jsperf.com v2. https://github.com/h5bp/lazyweb-requests/issues/174
Stars: ✭ 1,178 (+3469.7%)
Mutual labels:  benchmarking, benchmark
Benchexec
BenchExec: A Framework for Reliable Benchmarking and Resource Measurement
Stars: ✭ 108 (+227.27%)
Mutual labels:  benchmarking, benchmark
Pibench
Benchmarking framework for index structures on persistent memory
Stars: ✭ 46 (+39.39%)
Mutual labels:  benchmarking, benchmark
Tsung
Tsung is a high-performance benchmark framework for various protocols including HTTP, XMPP, LDAP, etc.
Stars: ✭ 2,185 (+6521.21%)
Mutual labels:  benchmarking, benchmark
Are We Fast Yet
Are We Fast Yet? Comparing Language Implementations with Objects, Closures, and Arrays
Stars: ✭ 161 (+387.88%)
Mutual labels:  benchmarking, benchmark
Pytest Django Queries
Generate performance reports from your django database performance tests.
Stars: ✭ 54 (+63.64%)
Mutual labels:  benchmarking, benchmark
LuaJIT-Benchmarks
LuaJIT Benchmark tests
Stars: ✭ 20 (-39.39%)
Mutual labels:  benchmarking, benchmark
Jsbench Me
jsbench.me - JavaScript performance benchmarking playground
Stars: ✭ 50 (+51.52%)
Mutual labels:  benchmarking, benchmark
Karma Benchmark
A Karma plugin to run Benchmark.js over multiple browsers with CI compatible output.
Stars: ✭ 88 (+166.67%)
Mutual labels:  benchmarking, benchmark
Dana
Test/benchmark regression and comparison system with dashboard
Stars: ✭ 46 (+39.39%)
Mutual labels:  benchmarking, benchmark
Phoronix Test Suite
The Phoronix Test Suite open-source, cross-platform automated testing/benchmarking software.
Stars: ✭ 1,339 (+3957.58%)
Mutual labels:  benchmarking, benchmark
Sysbench Docker Hpe
Sysbench Dockerfiles and Scripts for VM and Container benchmarking MySQL
Stars: ✭ 14 (-57.58%)
Mutual labels:  benchmarking, benchmark
Rtb
Benchmarking tool to stress real-time protocols
Stars: ✭ 35 (+6.06%)
Mutual labels:  benchmarking, benchmark
Sltbench
C++ benchmark tool. Practical, stable and fast performance testing framework.
Stars: ✭ 137 (+315.15%)
Mutual labels:  benchmarking, benchmark
language-benchmarks
A simple benchmark system for compiled and interpreted languages.
Stars: ✭ 21 (-36.36%)
Mutual labels:  benchmarking, benchmark

bench

Reliable performance measurement for Go programs. All in one design.

$ go install golang.design/x/bench@latest

Features

  • Combine benchstat, perflock and more...
  • Short command and only run benchmarks
  • Automatic performance locking for benchmarks
  • Automatic statistic analysis for benchmark results
  • Color indications for benchmark results

Usage

Enable bench Daemon (optional, Linux only)

$ cd $GOPATH/src/golang.design/x/bench
$ ./install.bash

If your init system is supported, this will also configure bench to start automatically on boot.

Or you can install and run bench daemon manually:

$ sudo install $GOPATH/bin/bench /usr/bin/bench
$ sudo -b bench -daemon

Default Behavior

$ bench

The detault behavior of bench run benchmarks under your current working directory, and each benchmark will be ran 10 times for further statistical analysis. It will also try to acquire performance lock from bench daemon to gain more stable results. Furthermore, the benchmark results are saved as a text file to the working directory and named as <timestamp>.txt.

Example:

$ cd example
$ bench
bench: run benchmarks under 90% cpufreq...
bench: go test -run=^$ -bench=. -count=10
goos: linux
goarch: amd64
pkg: golang.design/x/bench/example
BenchmarkDemo-16           21114             57340 ns/op
...
BenchmarkDemo-16           21004             57097 ns/op
PASS
ok      golang.design/x/bench/example   17.791s
bench: results are saved to file: ./bench-2020-11-07-19:59:51.txt

name     time/op
Demo-16  57.0µs ±1%

$ # ... do some changes to the benchmark ...

$ bench
bench: run benchmarks under 90% cpufreq...
bench: go test -run=^$ -bench=. -count=10
goos: linux
goarch: amd64
pkg: golang.design/x/bench/example
BenchmarkDemo-16          213145              5625 ns/op
...
BenchmarkDemo-16          212959              5632 ns/op
PASS
ok      golang.design/x/bench/example   12.536s
bench: results are saved to file: ./bench-2020-11-07-20:00:16.txt

name     time/op
Demo-16  5.63µs ±0%

$ bench bench-2020-11-07-19:59:51.txt bench-2020-11-07-20:00:16.txt
name     old time/op new time/op  delta
Demo-16  57.0µs ±1%  5.6µs ±0%   -90.13%  (p=0.000 n=10+8)

Options

Options for checking daemon status:

bench -list

Options for statistic tests:

bench old.txt [new.txt]             # same from benchstat
bench -delta-test
bench -alpha
bench -geomean
bench -split
bench -sort

Options for running benchmarks:

bench -v                            # enable verbose outputs
bench -shared                       # enable shared execution
bench -cpufreq 90                   # cpu frequency             (default: 90)
bench -name BenchmarkXXX            # go test `-bench` flag     (default: .)
bench -count 20                     # go test `-count` flag     (default: 10)
bench -time 100x                    # go test `-benchtime` flag (default: unset)
bench -cpuproc 1,2,4,8,16,32,128    # go test `-cpu` flag       (default: unset)

License

© 2020 The golang.design Authors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].