Skip to content

Commit

Permalink
tests: rename bencmarks for better view in benchstat
Browse files Browse the repository at this point in the history
  • Loading branch information
msaf1980 committed Mar 14, 2023
1 parent 1834291 commit 20ff537
Show file tree
Hide file tree
Showing 14 changed files with 83 additions and 83 deletions.
8 changes: 4 additions & 4 deletions gglob/gglob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ var (
stringBenchASCII = "DB.Sales.BalanceCluster.node1.DownEndpointCount"
)

func Benchmark_GGlob_ASCII(b *testing.B) {
func BenchmarkGGlob_ASCII(b *testing.B) {
for i := 0; i < b.N; i++ {
g := ParseMust(globBenchASCII)
if !g.Match(stringBenchASCII) {
Expand All @@ -190,7 +190,7 @@ func Benchmark_GGlob_ASCII(b *testing.B) {
}
}

func _Benchmark_Regex_ASCII(b *testing.B) {
func _BenchmarkRegex_ASCII(b *testing.B) {
for i := 0; i < b.N; i++ {
w := tests.BuildGlobRegexp(globBenchASCII)
if !w.MatchString(stringBenchASCII) {
Expand All @@ -199,7 +199,7 @@ func _Benchmark_Regex_ASCII(b *testing.B) {
}
}

func Benchmark_GGlob_ASCII_Precompiled(b *testing.B) {
func BenchmarkGGlob_ASCII_Precompiled(b *testing.B) {
g := ParseMust(globBenchASCII)

b.ResetTimer()
Expand All @@ -210,7 +210,7 @@ func Benchmark_GGlob_ASCII_Precompiled(b *testing.B) {
}
}

func _Benchmark_Regex_ASCII_Precompiled(b *testing.B) {
func _BenchmarkRegex_ASCII_Precompiled(b *testing.B) {
w := tests.BuildGlobRegexp(globBenchASCII)

b.ResetTimer()
Expand Down
6 changes: 3 additions & 3 deletions gglob/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ package gglob

import "testing"

func Benchmark_PathSplit(b *testing.B) {
func BenchmarkPathSplit(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = PathSplit(stringBenchASCII)
}
}

func Benchmark_PathSplitB(b *testing.B) {
func BenchmarkPathSplitB(b *testing.B) {
for i := 0; i < b.N; i++ {
parts := make([]string, 5)
_ = PathSplitB(stringBenchASCII, &parts)
}
}

func Benchmark_PathSplitB_Prealloc(b *testing.B) {
func BenchmarkPathSplitB_Prealloc(b *testing.B) {
parts := make([]string, 5)

b.ResetTimer()
Expand Down
8 changes: 4 additions & 4 deletions glob/glob_any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ var (
stringAnySkipASCII = "DBCassandraSalesSKIPSKIPSKIPSKIPSKIPSKIPSKIPSKIPSKIPSKIPSKIPSKIP_we_Status"
)

func Benchmark_Star_Any_Miss(b *testing.B) {
func BenchmarkStar_Any_Miss(b *testing.B) {
for i := 0; i < b.N; i++ {
g := ParseMust(globAnySkipASCII)
if g.Match(stringAnySkipASCII) {
Expand All @@ -104,7 +104,7 @@ func Benchmark_Star_Any_Miss(b *testing.B) {
}
}

func _Benchmark_Star_Any_Miss_Regex(b *testing.B) {
func _BenchmarkStar_Any_Miss_Regex(b *testing.B) {
for i := 0; i < b.N; i++ {
w := tests.BuildGlobRegexp(globAnySkipASCII)
if w.MatchString(stringAnySkipASCII) {
Expand All @@ -113,7 +113,7 @@ func _Benchmark_Star_Any_Miss_Regex(b *testing.B) {
}
}

func Benchmark_Star_Any_Miss_Precompiled(b *testing.B) {
func BenchmarkStar_Any_Miss_Precompiled(b *testing.B) {
g := ParseMust(globAnySkipASCII)

b.ResetTimer()
Expand All @@ -124,7 +124,7 @@ func Benchmark_Star_Any_Miss_Precompiled(b *testing.B) {
}
}

func _Benchmark_Star_Any_Miss_Regex_Precompiled(b *testing.B) {
func _BenchmarkStar_Any_Miss_Regex_Precompiled(b *testing.B) {
w := tests.BuildGlobRegexp(globAnySkipASCII)

b.ResetTimer()
Expand Down
8 changes: 4 additions & 4 deletions glob/glob_byte_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var (
globByte = "*T*"
)

func Benchmark_Star_Byte_Miss(b *testing.B) {
func BenchmarkStar_Byte_Miss(b *testing.B) {
for i := 0; i < b.N; i++ {
g := ParseMust(globByte)
if !g.Match(stringStarEndAscii) {
Expand All @@ -39,7 +39,7 @@ func Benchmark_Star_Byte_Miss(b *testing.B) {
}
}

func _Benchmark_Star_Byte_Miss_Regex(b *testing.B) {
func _BenchmarkStar_Byte_Miss_Regex(b *testing.B) {
for i := 0; i < b.N; i++ {
w := tests.BuildGlobRegexp(globByte)
if !w.MatchString(stringStarEndAscii) {
Expand All @@ -48,7 +48,7 @@ func _Benchmark_Star_Byte_Miss_Regex(b *testing.B) {
}
}

func Benchmark_Star_Byte_Miss_Precompiled(b *testing.B) {
func BenchmarkStar_Byte_Miss_Precompiled(b *testing.B) {
g := ParseMust(globByte)

b.ResetTimer()
Expand All @@ -59,7 +59,7 @@ func Benchmark_Star_Byte_Miss_Precompiled(b *testing.B) {
}
}

func _Benchmark_Star_Byte_Miss_Regex_Precompiled(b *testing.B) {
func _BenchmarkStar_Byte_Miss_Regex_Precompiled(b *testing.B) {
w := tests.BuildGlobRegexp(globByte)

b.ResetTimer()
Expand Down
12 changes: 6 additions & 6 deletions glob/glob_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var (
stringGroup = "cdqbcZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZcIe"
)

func Benchmark_Group(b *testing.B) {
func BenchmarkGroup(b *testing.B) {
for i := 0; i < b.N; i++ {
g := ParseMust(globGroup)
if !g.Match(stringGroup) {
Expand All @@ -122,7 +122,7 @@ func Benchmark_Group(b *testing.B) {
}
}

func _Benchmark_Group_Regex(b *testing.B) {
func _BenchmarkGroup_Regex(b *testing.B) {
for i := 0; i < b.N; i++ {
w := tests.BuildGlobRegexp(globGroup)
if !w.MatchString(stringGroup) {
Expand All @@ -131,7 +131,7 @@ func _Benchmark_Group_Regex(b *testing.B) {
}
}

func Benchmark_Group_Precompiled(b *testing.B) {
func BenchmarkGroup_Precompiled(b *testing.B) {
g := ParseMust(globGroup)

b.ResetTimer()
Expand All @@ -148,7 +148,7 @@ var (
stringStarGroup = "ZZZZZZZZcZZZZZZZZZZZZcdqbcZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZcIe"
)

func Benchmark_Star_Group(b *testing.B) {
func BenchmarkStar_Group(b *testing.B) {
for i := 0; i < b.N; i++ {
g := ParseMust(globStarGroup)
if !g.Match(stringStarGroup) {
Expand All @@ -157,7 +157,7 @@ func Benchmark_Star_Group(b *testing.B) {
}
}

func _Benchmark_Star_Group_Regex(b *testing.B) {
func _BenchmarkStar_Group_Regex(b *testing.B) {
for i := 0; i < b.N; i++ {
w := tests.BuildGlobRegexp(globStarGroup)
if !w.MatchString(stringStarGroup) {
Expand All @@ -166,7 +166,7 @@ func _Benchmark_Star_Group_Regex(b *testing.B) {
}
}

func Benchmark_Star_Group_Precompiled(b *testing.B) {
func BenchmarkStar_Group_Precompiled(b *testing.B) {
g := ParseMust(globStarGroup)

b.ResetTimer()
Expand Down
8 changes: 4 additions & 4 deletions glob/glob_rune_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var (
globRune = "*Т*"
)

func Benchmark_Star_Rune_Miss(b *testing.B) {
func BenchmarkStar_Rune_Miss(b *testing.B) {
for i := 0; i < b.N; i++ {
g := ParseMust(globRune)
if !g.Match(stringStarEndUnicode) {
Expand All @@ -51,7 +51,7 @@ func Benchmark_Star_Rune_Miss(b *testing.B) {
}
}

func _Benchmark_Star_Rune_Miss_Regex(b *testing.B) {
func _BenchmarkStar_Rune_Miss_Regex(b *testing.B) {
for i := 0; i < b.N; i++ {
w := tests.BuildGlobRegexp(globRune)
if !w.MatchString(stringStarEndUnicode) {
Expand All @@ -60,7 +60,7 @@ func _Benchmark_Star_Rune_Miss_Regex(b *testing.B) {
}
}

func Benchmark_Star_Rune_Miss_Precompiled(b *testing.B) {
func BenchmarkStar_Rune_Miss_Precompiled(b *testing.B) {
g := ParseMust(globRune)

b.ResetTimer()
Expand All @@ -71,7 +71,7 @@ func Benchmark_Star_Rune_Miss_Precompiled(b *testing.B) {
}
}

func _Benchmark_Star_Rune_Miss_Regex_Precompiled(b *testing.B) {
func _BenchmarkStar_Rune_Miss_Regex_Precompiled(b *testing.B) {
w := tests.BuildGlobRegexp(globRune)

b.ResetTimer()
Expand Down
16 changes: 8 additions & 8 deletions glob/glob_runesranges_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ var (
stringStarRuneRangesAscii = strings.Repeat("findПОИСК", 20) + "LAST_ENDOF"
)

func Benchmark_Star_RunesRanges_ASCII(b *testing.B) {
func BenchmarkStar_RunesRanges_ASCII(b *testing.B) {
for i := 0; i < b.N; i++ {
g := ParseMust(globStarRuneRangesAscii)
if !g.Match(stringStarRuneRangesAscii) {
Expand All @@ -103,7 +103,7 @@ func Benchmark_Star_RunesRanges_ASCII(b *testing.B) {
}
}

func _Benchmark_Star_RunesRanges_ASCII_Regex(b *testing.B) {
func _BenchmarkStar_RunesRanges_ASCII_Regex(b *testing.B) {
for i := 0; i < b.N; i++ {
w := tests.BuildGlobRegexp(globStarRuneRangesAscii)
if !w.MatchString(stringStarRuneRangesAscii) {
Expand All @@ -112,7 +112,7 @@ func _Benchmark_Star_RunesRanges_ASCII_Regex(b *testing.B) {
}
}

func Benchmark_Star_RunesRanges_ASCII_Precompiled(b *testing.B) {
func BenchmarkStar_RunesRanges_ASCII_Precompiled(b *testing.B) {
g := ParseMust(globStarRuneRangesAscii)

b.ResetTimer()
Expand All @@ -123,7 +123,7 @@ func Benchmark_Star_RunesRanges_ASCII_Precompiled(b *testing.B) {
}
}

func _Benchmark_Star_RunesRanges_ASCII_Regex_Precompiled(b *testing.B) {
func _BenchmarkStar_RunesRanges_ASCII_Regex_Precompiled(b *testing.B) {
g := tests.BuildGlobRegexp(globStarRuneRangesAscii)

b.ResetTimer()
Expand All @@ -140,7 +140,7 @@ var (
stringStarRuneRangesUnicode = strings.Repeat("findПОИСК", 20) + "LAЕT_ENDOF"
)

func Benchmark_Star_RunesRanges_Unicode(b *testing.B) {
func BenchmarkStar_RunesRanges_Unicode(b *testing.B) {
for i := 0; i < b.N; i++ {
g := ParseMust(globStarRuneRangesUnicode)
if !g.Match(stringStarRuneRangesUnicode) {
Expand All @@ -149,7 +149,7 @@ func Benchmark_Star_RunesRanges_Unicode(b *testing.B) {
}
}

func _Benchmark_Star_RunesRanges_Unicode_Regex(b *testing.B) {
func _BenchmarkStar_RunesRanges_Unicode_Regex(b *testing.B) {
for i := 0; i < b.N; i++ {
w := tests.BuildGlobRegexp(globStarRuneRangesUnicode)
if !w.MatchString(stringStarRuneRangesUnicode) {
Expand All @@ -158,7 +158,7 @@ func _Benchmark_Star_RunesRanges_Unicode_Regex(b *testing.B) {
}
}

func Benchmark_Star_RunesRanges_Unicode_Precompiled(b *testing.B) {
func BenchmarkStar_RunesRanges_Unicode_Precompiled(b *testing.B) {
g := ParseMust(globStarRuneRangesUnicode)

b.ResetTimer()
Expand All @@ -169,7 +169,7 @@ func Benchmark_Star_RunesRanges_Unicode_Precompiled(b *testing.B) {
}
}

func _Benchmark_Star_RunesRanges_Unicode_Regex_Precompiled(b *testing.B) {
func _BenchmarkStar_RunesRanges_Unicode_Regex_Precompiled(b *testing.B) {
g := tests.BuildGlobRegexp(globStarRuneRangesUnicode)

b.ResetTimer()
Expand Down
8 changes: 4 additions & 4 deletions glob/glob_size_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var (
stringMaxSizeCheck = strings.Repeat("findПОИСК", 10) + "LAST_Й_ENDOF"
)

func Benchmark_Size_Max(b *testing.B) {
func BenchmarkSize_Max(b *testing.B) {
for i := 0; i < b.N; i++ {
g := ParseMust(globMaxSizeCheck)
if g.Match(stringMaxSizeCheck) {
Expand All @@ -21,7 +21,7 @@ func Benchmark_Size_Max(b *testing.B) {
}
}

func _Benchmark_Size_Max_Regex(b *testing.B) {
func _BenchmarkSize_Max_Regex(b *testing.B) {
for i := 0; i < b.N; i++ {
w := tests.BuildGlobRegexp(globMaxSizeCheck)
if w.MatchString(stringMaxSizeCheck) {
Expand All @@ -30,7 +30,7 @@ func _Benchmark_Size_Max_Regex(b *testing.B) {
}
}

func Benchmark_Size_Max_Precompiled(b *testing.B) {
func BenchmarkSize_Max_Precompiled(b *testing.B) {
g := ParseMust(globMaxSizeCheck)

b.ResetTimer()
Expand All @@ -41,7 +41,7 @@ func Benchmark_Size_Max_Precompiled(b *testing.B) {
}
}

func _Benchmark_Size_Max_Regex_Precompiled(b *testing.B) {
func _BenchmarkSize_Max_Regex_Precompiled(b *testing.B) {
w := tests.BuildGlobRegexp(globMaxSizeCheck)

b.ResetTimer()
Expand Down
Loading

0 comments on commit 20ff537

Please sign in to comment.