Description
Automatic storage and comparison of benchmarks in pretty format
prettybenchcmp alternatives and similar packages
Based on the "Testing" category.
Alternatively, view prettybenchcmp alternatives based on common mentions on social networks and blogs.
-
chromedp
a way to drive/test Chrome, Safari, Edge, Android Webviews, and other browsers supporting the Chrome Debugging Protocol. -
realize
Go build system with file watchers and live reload. Run, build and watch file changes with custom paths -
selenoid
alternative Selenium hub server that launches browsers within containers. -
hoverfly
HTTP(S) proxy for recording and simulating REST/SOAP APIs with extensible middleware and easy-to-use CLI. -
httpexpect
Go module that helps to write nice tests for your HTTP API. -
Looking for Maintainer
Selenium/Webdriver client for Go -
baloo
Expressive and versatile end-to-end HTTP API testing made easy. -
testfixtures
A helper for Rails' like test fixtures to test database applications. -
Mmock
Mmock is an HTTP mocking application for testing and fast prototyping -
counterfeiter
Tool for generating self-contained mock objects -
cdp
Type-safe bindings for the Chrome Debugging Protocol that can be used with browsers or other debug targets that implement it. -
go-vcr
Record and replay your HTTP interactions for fast, deterministic and accurate tests -
goc
Goc is a comprehensive coverage testing system for The Go Programming Language. -
gnomock
integration testing with real dependencies (database, cache, even Kubernetes or AWS) running in Docker, without mocks. -
ggr
a lightweight server that routes and proxies Selenium Wedriver requests to multiple Selenium hubs. -
go-txdb
Single transaction based database driver mainly for testing purposes. -
playwright-go
browser automation library to control Chromium, Firefox and WebKit with a single API. -
charlatan
Tool to generate fake interface implementations for tests. -
gotest.tools
A collection of packages to augment the go testing package and support common patterns. -
go-testdeep
Extremely flexible golang deep comparison, extends the go testing package -
dbcleaner
Clean database for testing purpose, inspired by database_cleaner in Ruby
Scout APM - Leading-edge performance monitoring starting at $39/month
Do you think we are missing an alternative of prettybenchcmp or a related project?
README
prettybenchcmp
prettybenchcmp is cmd tool for storage and comparison of benchmarks results. There is a standard tool benchcmp, but I don't think that the standard programmer will use it because it so boring! Do you doubt?:smirk: Ok, just check instruction for benchcmp! or check "What exactly different from benchcmp". prettybenchcmp simply automates routine and do it good:sparkles:!
How to use
go get github.com/im7mortal/prettybenchcmp
// exec this command in a project directory
prettybenchcmp
//or with test and benchcmp flags
prettybenchcmp -short -benchtime 10s -count 2 -cpu 1,2,4 -changed -mag -best
First time when you use it. It will create .benchHistory file which exist bench history in the special format. Check format of .benchHistory for details
It will return standard output of benchcmp. Like:
benchmark old ns/op new ns/op delta
BenchmarkGetLastBenchmark3651-4 1715 1736 +1.22%
BenchmarkGetLastBenchmark24456-4 1703 1689 -0.82%
benchmark old allocs new allocs delta
BenchmarkGetLastBenchmark3651-4 3 3 +0.00%
BenchmarkGetLastBenchmark24456-4 3 3 +0.00%
benchmark old bytes new bytes delta
BenchmarkGetLastBenchmark3651-4 4224 4224 +0.00%
BenchmarkGetLastBenchmark24456-4 4224 4224 +0.00%
What exactly different from benchcmp
benchcmp use temp files. The goofy moment is that you have to create it yourself:boom:. Furthermore you have to checkout git commits for it and do it carefully:heavy_exclamation_mark:
Different is that prettybenchcmp don't use temp files and keep story in local file .benchHistory. It allow get actual result with one simple action! Enjoy:star:!
Supported flags from "go test"
prettybenchcmp support couple of flags from "go test". It allow pass these flags
- -benchtime
- -count
- -cpu
- -short
Check "go test" documentation for details.
Supported flags from benchcmp
prettybenchcmp support all flags from benchcmp.
- -mag
- -best
- -changed
Check benchcmp documentation for details.
How it work
If .benchHistory doesn't exist.
- It create .benchHistory. Do first benchmark and write it to .benchHistory.
If .benchHistory exist but doesn't exist in git.
- It clean .benchHistory and write current benchmark
If .benchHistory has history
- It parse .benchHistory.
- It check that file has a hash of previous commit which contain .benchHistory changes.
- If true
- it truncate part of file which contain previous benchmark
- else
- it write to file: a separator, previous hash commit which contain .benchHistory changes, current benchmark
Format of .benchHistory
yoshkarola 3235f14078c462b38c4b79912c1e34c868d34049
PASS
BenchmarkUnquoteEasy 10000000 182 ns/op 0 B/op 0 allocs/op
BenchmarkUnquoteHard 1000000 1119 ns/op 192 B/op 2 allocs/op
ok github.com/im7mortal/benchcmp2 3.141s
Where yoshkarola
is separator.
3235f14078c462b38c4b79912c1e34c868d34049
is commit hash where file .benchHistory was changed last time.
Further is a standard output of go test -bench=. -benchmem
PASS
BenchmarkUnquoteEasy 10000000 182 ns/op 0 B/op 0 allocs/op
BenchmarkUnquoteHard 1000000 1119 ns/op 192 B/op 2 allocs/op
ok github.com/im7mortal/benchcmp2 3.141s
Authors
- Petr Lozhkin [email protected]
License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*Note that all licence references and agreements mentioned in the prettybenchcmp README section above
are relevant to that project's source code only.