YUKI Hiroshi
null+****@clear*****
Mon Jan 20 18:49:29 JST 2014
YUKI Hiroshi 2014-01-20 18:49:29 +0900 (Mon, 20 Jan 2014) New Revision: 4f6f3eb2d7064e9cd6273420867f33ece40f44b5 https://github.com/droonga/fluent-plugin-droonga/commit/4f6f3eb2d7064e9cd6273420867f33ece40f44b5 Message: Add run-test.rb to run drnbench Added files: test/performance/run-test.rb Added: test/performance/run-test.rb (+50 -0) 100755 =================================================================== --- /dev/null +++ test/performance/run-test.rb 2014-01-20 18:49:29 +0900 (75adbf6) @@ -0,0 +1,50 @@ +#!/usr/bin/env ruby +# +# Copyright (C) 2014 Droonga Project +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1 as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +require "rbconfig" +require "fileutils" + +def run(*command_line) + return if system(*command_line) + puts("failed to run: #{command_line.join(' ')}") + exit(false) +end + +base_dir = File.dirname(__FILE__) +lib_dir = File.expand_path(File.join(base_dir, "..", "..", "lib")) + +drnbench_options = [] +drnbench_options.concat(["--start-n-subscribers", 1000]) +drnbench_options.concat(["--n-publishings", 1000]) +drnbench_options.concat(["--n-steps", 10]) +drnbench_options.concat(["--timeout", 5]) +drnbench_options.concat(["--subscribe-request-file", + File.join(base_dir, "watch", "subscribe.json")]) +drnbench_options.concat(["--feed-file", + File.join(base_dir, "watch", "feed.json")]) + +drnbench_options.concat(["--protocol-adapter-port", 13000]) +drnbench_options.concat(["--protocol-adapter-application-dir", + File.join(base_dir, "..", "..", "..", "express-droonga")]) +drnbench_options.concat(["--protocol-adapter-port", 13000]) + +drnbench_options.concat(["--engine-config-path", + File.join(base_dir, "watch")]) +drnbench_options.concat(["--fluentd-options", "-I#{lib_dir}"]) +drnbench_options.concat(ARGV) + +run("bundle", "exec", "drnbench-publish-subscribe", *drnbench_options) -------------- next part -------------- HTML����������������������������... Download