Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support sub benchmarks #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var bTests = []struct {
{"BenchmarkF2_F0000000-4 50000000 29.4 ns/op", "F2", "F0000000", 29.4},
{"BenchmarkF0_FF-2 10000000 37.4 ns/op", "F0", "FF", 37.4},
{"BenchmarkF_0-2 40000000 11.2 ns/op", "F", "0", 11.2},
{"BenchmarkF3/quicksort_100-4 40000000 11.2 ns/op", "F3/quicksort", "100", 11.2},
}

func TestParser(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

// Coder should use following naming convention for Benchmark functions
// Naming convention: Benchmark[Function_name]_[Function_argument](b *testing.B)
var re *regexp.Regexp = regexp.MustCompile(`Benchmark([a-zA-Z0-9]+)_([_a-zA-Z0-9]+)-([0-9]+)$`)
var re *regexp.Regexp = regexp.MustCompile(`Benchmark([a-zA-Z0-9/]+)_([_a-zA-Z0-9]+)-([0-9]+)$`)

// Storage for Func(Arg)=Result relations
type BenchArgSet map[string]float64
Expand Down