YUKI Hiroshi
null+****@clear*****
Mon Oct 28 19:31:13 JST 2013
YUKI Hiroshi 2013-10-28 19:31:13 +0900 (Mon, 28 Oct 2013) New Revision: 55b9139926eeca7bb92a884456c8588df79befde https://github.com/droonga/fluent-plugin-droonga/commit/55b9139926eeca7bb92a884456c8588df79befde Message: Benchmark: specify dataset Modified files: benchmark/utils.rb benchmark/watch/benchmark-notify.rb Modified: benchmark/utils.rb (+4 -3) =================================================================== --- benchmark/utils.rb 2013-10-28 18:59:10 +0900 (0558158) +++ benchmark/utils.rb 2013-10-28 19:31:13 +0900 (1f37e5d) @@ -18,6 +18,8 @@ require "json" module DroongaBenchmark + WATCH_DATASET = "Watch" + class WatchDatabase attr_reader :context @@ -169,6 +171,7 @@ module DroongaBenchmark def envelope_to_subscribe(keyword, route=nil) message = { "id" => Time.now.to_f.to_s, + "dataset" => WATCH_DATASET, "date" => Time.now, "statusCode" => 200, "type" => "watch.subscribe", @@ -177,15 +180,13 @@ module DroongaBenchmark "subscriber" => "subscriber for #{keyword}", }, } - unless route.nil? - message["body"]["route"] = route - end message end def envelope_to_feed(keyword) { "id" => Time.now.to_f.to_s, + "dataset" => WATCH_DATASET, "date" => Time.now, "statusCode" => 200, "type" => "watch.feed", Modified: benchmark/watch/benchmark-notify.rb (+3 -2) =================================================================== --- benchmark/watch/benchmark-notify.rb 2013-10-28 18:59:10 +0900 (217d40b) +++ benchmark/watch/benchmark-notify.rb 2013-10-28 19:31:13 +0900 (f1ff9f3) @@ -63,8 +63,9 @@ class NotifyBenchmark def add_subscribers(n_subscribers) n_subscribers.times do - message = DroongaBenchmark::MessageCreator.envelope_to_subscribe(WATCHING_KEYWORD, @route) - @client.connection.send(message) + message = DroongaBenchmark::MessageCreator.envelope_to_subscribe(WATCHING_KEYWORD) + message["body"]["route"] = @route + @client.connection.send_receive(message) end @n_subscribers += n_subscribers end -------------- next part -------------- HTML����������������������������...Download