Documentation
¶
Overview ¶
Package prettybenchmarks formats your go benchmarks into nice looking sorted tables
Prettybenchmarks ¶
Works with and without -benchmem flag ¶
If you provide a time interval (either ns, µs (or us), ms, s), each benchmark's runtime will be converted to that interval. If left blank, a suitable value will automatically be chosen
go test -bench=YOUR_PKG [-benchmem] | pb [timeinterval]
Example
go test -bench=. -benchmem | pb ms
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Main ¶
func Main()
Main is the entry point to parse benchmarks not intended for use in libraries, but has to be exported to ensure the tool can be called via 'pb'
func RenderFloat ¶
RenderFloat formats a given integer n according to the provided format Examples of format strings for given n = 12345.6789:
"#,###.##" => "12,345.67" "#,###." => "12,345" "#,###" => "12345,678" "#\u202F###,##" => "12 345,67" "#.###,###### => 12.345,678900 "" (aka default format) => 12,345.67
Author: https://github.com/gorhill, Source: https://gist.github.com/gorhill/5285193
func RenderInteger ¶
RenderInteger formats a given integer n according to the provided format Examples of format strings for given n = 12345:
"#,###.##" => "12,345.00" "#,###." => "12,345" "#,###" => "12345,000" "#\u202F###,##" => "12 345,00" "#.###,###### => 12.345,000000 "" (aka default format) => 12,345.00
Author: https://github.com/gorhill, Source: https://gist.github.com/gorhill/5285193
func StringsContains ¶
StringsContains checks if a string slice contains search element
Types ¶
This section is empty.