From 9c1b2abcabd5085a054faf124c3510c8c37d2c5f Mon Sep 17 00:00:00 2001 From: QiuHaohao Date: Sat, 15 Feb 2020 15:50:27 +0800 Subject: [PATCH 1/2] Add '/' in Function_name pattern It's possible to get '/' in the function name part when running sub-benchmarks --- parse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.go b/parse.go index 61d1774..e7e17be 100644 --- a/parse.go +++ b/parse.go @@ -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 From 83c30a98ba2b4b2b8b1f504729fbf79f87037953 Mon Sep 17 00:00:00 2001 From: QiuHaohao Date: Sat, 15 Feb 2020 15:54:45 +0800 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f8bc2b..a136eed 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ In Golang we can analyze algorithm efficiency by writing benchmark functions and ```bash git clone https://github.com/CodingBerg/benchgraph.git -cd ./benchmark +cd ./benchgraph go get ./ go install ```