store: add StringStore benchmarks

This commit is contained in:
Leo Balduf
2016-06-19 12:50:21 -04:00
parent f4101f83e0
commit c191e04ee7
2 changed files with 381 additions and 2 deletions
+83 -2
View File
@@ -11,10 +11,91 @@ import (
)
var (
driver = &stringStoreDriver{}
stringStoreTester = store.PrepareStringStoreTester(driver)
driver = &stringStoreDriver{}
stringStoreTester = store.PrepareStringStoreTester(driver)
stringStoreBenchmarker = store.PrepareStringStoreBenchmarker(&stringStoreDriver{})
)
func TestStringStore(t *testing.T) {
stringStoreTester.TestStringStore(t, &store.DriverConfig{})
}
func BenchmarkStringStore_AddShort(b *testing.B) {
stringStoreBenchmarker.AddShort(b, &store.DriverConfig{})
}
func BenchmarkStringStore_AddLong(b *testing.B) {
stringStoreBenchmarker.AddLong(b, &store.DriverConfig{})
}
func BenchmarkStringStore_LookupShort(b *testing.B) {
stringStoreBenchmarker.LookupShort(b, &store.DriverConfig{})
}
func BenchmarkStringStore_LookupLong(b *testing.B) {
stringStoreBenchmarker.LookupLong(b, &store.DriverConfig{})
}
func BenchmarkStringStore_AddRemoveShort(b *testing.B) {
stringStoreBenchmarker.AddRemoveShort(b, &store.DriverConfig{})
}
func BenchmarkStringStore_AddRemoveLong(b *testing.B) {
stringStoreBenchmarker.AddRemoveLong(b, &store.DriverConfig{})
}
func BenchmarkStringStore_LookupNonExistShort(b *testing.B) {
stringStoreBenchmarker.LookupNonExistShort(b, &store.DriverConfig{})
}
func BenchmarkStringStore_LookupNonExistLong(b *testing.B) {
stringStoreBenchmarker.LookupNonExistLong(b, &store.DriverConfig{})
}
func BenchmarkStringStore_RemoveNonExistShort(b *testing.B) {
stringStoreBenchmarker.RemoveNonExistShort(b, &store.DriverConfig{})
}
func BenchmarkStringStore_RemoveNonExistLong(b *testing.B) {
stringStoreBenchmarker.RemoveNonExistLong(b, &store.DriverConfig{})
}
func BenchmarkStringStore_Add1KShort(b *testing.B) {
stringStoreBenchmarker.Add1KShort(b, &store.DriverConfig{})
}
func BenchmarkStringStore_Add1KLong(b *testing.B) {
stringStoreBenchmarker.Add1KLong(b, &store.DriverConfig{})
}
func BenchmarkStringStore_Lookup1KShort(b *testing.B) {
stringStoreBenchmarker.Lookup1KShort(b, &store.DriverConfig{})
}
func BenchmarkStringStore_Lookup1KLong(b *testing.B) {
stringStoreBenchmarker.Lookup1KLong(b, &store.DriverConfig{})
}
func BenchmarkStringStore_AddRemove1KShort(b *testing.B) {
stringStoreBenchmarker.AddRemove1KShort(b, &store.DriverConfig{})
}
func BenchmarkStringStore_AddRemove1KLong(b *testing.B) {
stringStoreBenchmarker.AddRemove1KLong(b, &store.DriverConfig{})
}
func BenchmarkStringStore_LookupNonExist1KShort(b *testing.B) {
stringStoreBenchmarker.LookupNonExist1KShort(b, &store.DriverConfig{})
}
func BenchmarkStringStore_LookupNonExist1KLong(b *testing.B) {
stringStoreBenchmarker.LookupNonExist1KLong(b, &store.DriverConfig{})
}
func BenchmarkStringStore_RemoveNonExist1KShort(b *testing.B) {
stringStoreBenchmarker.RemoveNonExist1KShort(b, &store.DriverConfig{})
}
func BenchmarkStringStore_RemoveNonExist1KLong(b *testing.B) {
stringStoreBenchmarker.RemoveNonExist1KLong(b, &store.DriverConfig{})
}