testing: benchmarks moved to separate files

This commit is contained in:
Michał Matczuk
2018-05-22 16:37:02 +02:00
parent 444d07da6a
commit a8febbc71e
17 changed files with 169 additions and 108 deletions

22
mapper_bench_test.go Normal file
View File

@@ -0,0 +1,22 @@
// Copyright (C) 2017 ScyllaDB
// Use of this source code is governed by a ALv2-style
// license that can be found in the LICENSE file.
package gocqlx
import (
"strings"
"testing"
)
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)
}
}