testing: benchmarks moved to separate files
This commit is contained in:
@@ -2,12 +2,9 @@
|
||||
// Use of this source code is governed by a ALv2-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !integration
|
||||
|
||||
package gocqlx
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -72,15 +69,3 @@ func TestSnakeCase(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkSnakeCase(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
snakeCase(snakeTable[b.N%len(snakeTable)].N)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkToLower(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
strings.ToLower(snakeTable[b.N%len(snakeTable)].N)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user