https://github.com/drish/benchparser
Benchparser is a parser for multiple benchmark output formats
https://github.com/drish/benchparser
Last synced: about 1 year ago
JSON representation
Benchparser is a parser for multiple benchmark output formats
- Host: GitHub
- URL: https://github.com/drish/benchparser
- Owner: drish
- License: mit
- Created: 2019-09-18T01:20:19.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-28T03:12:42.000Z (almost 7 years ago)
- Last Synced: 2025-06-09T05:51:26.449Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.com/drish/benchparser)
[](https://badge.fury.io/rb/benchparser)
# Benchparser
Benchparser is a parser for multiple benchmark output formats
## Installation
```ruby
gem 'benchparser'
```
### Usage
Golang benchmark standard output
```text
goos: darwin
goarch: amd64
pkg: github.com/drish/parser
BenchmarkFib1-8 1000000000 2.48 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/drish/parser 9.960s
```
```ruby
require 'benchparser'
parsed = Bp.parse(:go, data)
parsed.language # go
parsed.configs[:goos] # darwin
parsed.configs[:pkg] # darwin
parsed.functions.count # 1
parsed.functions.first[:iterations] # 1000000000
parsed.functions.first[:ns_op] # 2.48
parsed.functions.first[:bytes_op] # 0
parsed.functions.first[:allocs_op] # 0
```
#### TODO
- [ ] Ruby [benchmark](https://ruby-doc.org/stdlib-2.5.0/libdoc/benchmark/rdoc/)
- [ ] Python [timeit](https://docs.python.org/2/library/timeit.html)
- [ ] Rust [Criterion](https://github.com/bheisler/criterion.rs)
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/drish/benchparser.