[Groonga-commit] droonga/fluent-plugin-droonga at 6c67e46 [master] benchmark: use Rroonga's restore feature

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Oct 25 17:39:26 JST 2013


Kouhei Sutou	2013-10-25 17:39:26 +0900 (Fri, 25 Oct 2013)

  New Revision: 6c67e465c112b67887d53d562d84b8adc1edf2b4
  https://github.com/droonga/fluent-plugin-droonga/commit/6c67e465c112b67887d53d562d84b8adc1edf2b4

  Message:
    benchmark: use Rroonga's restore feature

  Modified files:
    benchmark/watch/benchmark-scan.rb

  Modified: benchmark/watch/benchmark-scan.rb (+6 -3)
===================================================================
--- benchmark/watch/benchmark-scan.rb    2013-10-25 17:29:47 +0900 (aaee923)
+++ benchmark/watch/benchmark-scan.rb    2013-10-25 17:39:26 +0900 (d46f5b8)
@@ -34,11 +34,14 @@ database_path = "/tmp/watch-benchmark"
 ddl_path = File.expand_path(File.join(__FILE__, "..", "benchmark-watch-ddl.grn"))
 FileUtils.rm_rf(database_path)
 FileUtils.mkdir_p(database_path)
-`cat #{ddl_path} | groonga -n #{database_path}/db`
 
-Groonga::Database.open("#{database_path}/db")
+Groonga::Database.create(:path => "#{database_path}/db")
+context = Groonga::Context.default
+File.open(ddl_path) do |ddl|
+  context.restore(ddl)
+end
 
-worker = StubWorker.new(Groonga::Context.default)
+worker = StubWorker.new(context)
 watch = Droonga::WatchHandler.new(worker)
 
 n = 100
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index