Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added search benchmark

  • Loading branch information...
commit e208d671208182cb6466672882626335217e073b 1 parent 85417a0
Oleg Andreev authored
Showing with 25 additions and 0 deletions.
  1. +25 −0 meta/benchmarks/search.rb
View
25 meta/benchmarks/search.rb
@@ -0,0 +1,25 @@
+$:.unshift File.dirname(__FILE__) + "/../../lib"
+require 'strokedb'
+include StrokeDB
+
+require 'benchmark'
+include Benchmark
+
+FileUtils.rm_rf "../../spec/temp/storages/search_bench"
+StrokeDB::Config.build :default => true, :base_path => "../../spec/temp/storages/search_bench"
+
+Skiplist.optimize!(:C)
+
+puts "before Meta.new"
+User = Meta.new
+puts "before User.create!"
+1.times {|i| User.create! :i => i }
+puts "before User.find"
+# Benchmark.bm(17) do |x|
+# GC.start
+# x.report("Search ") do
+ 1.times do
+ User.find :i => 2
+ end
+# end
+# end
Please sign in to comment.
Something went wrong with that request. Please try again.