Permalink
Browse files

bench

  • Loading branch information...
1 parent 57d4b92 commit d8b146e6b49557c591abafb6b3da029009e8c879 @bmizerany committed Oct 31, 2011
Showing with 24 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +23 −0 bench_test.go
View
@@ -5,3 +5,4 @@ _gotest_.6
*.6
_testmain.go
.DS_Store
+*.prof
View
@@ -0,0 +1,23 @@
+package mc
+
+import (
+ "testing"
+)
+
+func BenchmarkSet5k(b *testing.B) {
+ b.StopTimer()
+ cn, err := Dial("localhost:11211")
+ if err != nil {
+ panic(err)
+ }
+
+ b.StartTimer()
+ defer b.StopTimer()
+
+ for i := 0; i < b.N; i++ {
+ err = cn.Set("foo", "bar", 0, 0, 0)
+ if err != nil {
+ panic(err)
+ }
+ }
+}

0 comments on commit d8b146e

Please sign in to comment.