Benchmarks for all cursors.
diff --git a/cursor_test.go b/cursor_test.go
index 762996a..970025a 100644
--- a/cursor_test.go
+++ b/cursor_test.go
@@ -2,7 +2,7 @@
import "testing"
-func BenchmarkWrites(b *testing.B) {
+func BenchmarkCursorStore(b *testing.B) {
iterations := int64(b.N)
cursor := NewCursor()
@@ -14,3 +14,27 @@
cursor.Store(i)
}
}
+func BenchmarkCursorLoad(b *testing.B) {
+ iterations := int64(b.N)
+
+ cursor := NewCursor()
+
+ b.ReportAllocs()
+ b.ResetTimer()
+
+ for i := int64(0); i < iterations; i++ {
+ cursor.Load()
+ }
+}
+func BenchmarkCursorRead(b *testing.B) {
+ iterations := int64(b.N)
+
+ cursor := NewCursor()
+
+ b.ReportAllocs()
+ b.ResetTimer()
+
+ for i := int64(0); i < iterations; i++ {
+ cursor.Read(i)
+ }
+}