YUKI Hiroshi
null+****@clear*****
Wed Jan 15 18:42:24 JST 2014
YUKI Hiroshi 2014-01-15 18:42:24 +0900 (Wed, 15 Jan 2014) New Revision: 300a883e4a1d6fca9c51d44bf7a3d468cefd2bad https://github.com/droonga/drnbench/commit/300a883e4a1d6fca9c51d44bf7a3d468cefd2bad Message: Add descriptions how to run benchmark Modified files: README.md Modified: README.md (+71 -1) =================================================================== --- README.md 2013-11-12 10:11:35 +0900 (2760937) +++ README.md 2014-01-15 18:42:24 +0900 (6bc4cc7) @@ -4,7 +4,77 @@ Drnbench is a benchmark tool for Droonga. -It may be used for other HTTP servers. +It may be used for other HTTP servers (in future versions). + + +## How to run benchmark? + +### Benchmarking of a Droonga Engine instance. + + 1. Prepare scenario file. + + { + "(scenario 1 name)": { + "frequency": (appearance ratio in all requests), + "patterns": [ + { search queries 1 }, + { search queries 2 }, + { search queries 3 }, + ... + ] + } + "(scenario 2 name)": { + ... + }, + ... + } + + For example, a file "patterns.json" like: + + { + "user search": { + "frequency": 0.61, + "patterns": [ + { + "users": { + "source": "User", + "condition": "age >= 10", + "sortBy": { "keys": ["-birthday"], "offset": 0, "limit": 100" }, + "output": { + "elements": [ + "count", + "records" + ], + "offset": 0, + "limit": 100, + "attributes": ["_key", "name", "age", "birhtday"] + } + } + }, + ... + ] + } + } + + 2. Run drnbench with the scenario. + + # cd ~/drnbench + # RUBYLIB=lib/ bin/drnbench \ + --start-n-clients=1 \ + --end-n-clients=32 \ + --step=1 \ + --duration=10 \ + --wait=0.01 \ + --request-patterns-file=/tmp/patterns.json \ + --host=localhost \ + --port=3003 + 3. You'll get a result like: + + n_clients,total_n_requests,queries_per_second,min_elapsed_time,max_elapsed_time,average_elapsed_time,200 + 1,33,3.3,0.164632187,0.164632187,0.19133309036363635,0 + 2,70,7.0,0.161510877,0.161510877,0.1846983412285715,0 + 3,87,8.7,0.1658357,0.1658357,0.24303329366666668,0 + ... ## License -------------- next part -------------- HTML����������������������������... Télécharger