mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-17 09:59:46 -07:00
store: add StringStore benchmarks
This commit is contained in:
@@ -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{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user