Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/storozhukBM/benchart
https://github.com/storozhukBM/benchart
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/storozhukBM/benchart
- Owner: storozhukBM
- License: mit
- Created: 2022-05-31T18:26:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-02T20:37:58.000Z (over 2 years ago)
- Last Synced: 2024-08-01T19:46:23.383Z (5 months ago)
- Language: Go
- Size: 52.7 KB
- Stars: 10
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go-perf - storozhukBM/benchart - Tool that takes `benchstat -csv` output as an input and plots results of your benchmark in a html file. (Benchmarks)
README
# benchart [![Build Status](https://github.com/storozhukBM/benchart/workflows/Go/badge.svg)](https://github.com/storozhukBM/benchart/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/storozhukBM/benchart)](https://goreportcard.com/report/github.com/storozhukBM/benchart) [![PkgGoDev](https://pkg.go.dev/badge/github.com/storozhukBM/benchart)](https://pkg.go.dev/github.com/storozhukBM/benchart)
benchart is a tool that takes [benchstat -csv](https://pkg.go.dev/golang.org/x/perf/cmd/benchstat#section-readme)
output as an input and plots results of your benchmark in a html file.
All you need to do is format your benchmark's name properly.All measurement attributes that benchart parses should be split by `;` and every attribute consists of key and value
separated by `:`. Every measurement should have at least 2 attributes: one it `type` that will be used to label your
chart and one additional attribute that will act as `x-axis` by default the last attribute will be interpreted
as `x-axis`.```
name,time/op (ns/op),±
Hash/type:crc32;bytes:8-8,4.47967E+00,0%
|________| |_____|
mandatory x-axis
attribute
```You can also provide additional chart option sets. Every chart option set should have chart name at the beginning and then set
of options separated by `;`. Every option in a set should have key and value separated by `=`.
Supported options:
- `title` - string start will be used as a graph title instead of name from csv file
- `xAxisName` - overrides x-axis name on graph
- `xAxisType` - changes type of x-axis, by default we use linear scale, but you can specify `log` scale
- `yAxisType` - changes type of y-axis, by default we use linear scale, but you can specify `log` scaleExample of a command with options specified
> benchart 'Hash;title=Benchmark of hash functions;xAxisName=bytes size;xAxisType=log' input.csv result.html
Other examples of benchart usage are in the testdata directory.