YUKI Hiroshi
null+****@clear*****
Wed Nov 6 15:21:24 JST 2013
YUKI Hiroshi 2013-11-06 15:21:24 +0900 (Wed, 06 Nov 2013) New Revision: 4aac4ae5d04364bcd08925ce15d4a3fe7813823a https://github.com/droonga/fluent-plugin-droonga/commit/4aac4ae5d04364bcd08925ce15d4a3fe7813823a Message: Benchmark: initialize database without DDL Modified files: benchmark/utils.rb benchmark/watch/benchmark-notify.rb Modified: benchmark/utils.rb (+3 -4) =================================================================== --- benchmark/utils.rb 2013-11-05 15:08:33 +0900 (5b754b6) +++ benchmark/utils.rb 2013-11-06 15:21:24 +0900 (52b4476) @@ -16,6 +16,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA require "json" +require "droonga/watch_schema" module DroongaBenchmark WATCH_DATASET = "Watch" @@ -26,7 +27,6 @@ module DroongaBenchmark def initialize @database_dir = "/tmp/watch-benchmark" @database_path = "#{@database_dir}/db" - @ddl_path = File.expand_path(File.join(__FILE__, "..", "..", "ddl", "watchdb.grn")) FileUtils.rm_rf(@database_dir) FileUtils.mkdir_p(@database_dir) @@ -34,9 +34,8 @@ module DroongaBenchmark @context = Groonga::Context.new @context.open_database(@database_path) - File.open(@ddl_path) do |ddl| - @context.restore(ddl) - end + schema = Droonga::WatchSchema.new(@context) + schema.ensure_created end =begin Modified: benchmark/watch/benchmark-notify.rb (+0 -7) =================================================================== --- benchmark/watch/benchmark-notify.rb 2013-11-05 15:08:33 +0900 (54d462f) +++ benchmark/watch/benchmark-notify.rb 2013-11-06 15:21:24 +0900 (134b389) @@ -46,13 +46,6 @@ class NotifyBenchmark end def setup - ddl_path = File.expand_path(File.join(__FILE__, "..", "..", "..", "ddl", "watchdb.jsons")) - File.open(ddl_path, "r") do |file| - file.each_line do |json| - message = JSON.parse(json) - @client.connection.send_receive(message) - end - end add_subscribers(@params[:n_initial_subscribers]) end -------------- next part -------------- HTML����������������������������...Download