Skip to content

Commit c20ff86

Browse files
author
Takashi Sogabe
committed
Add riak_cs support (imported from riak_cs/bench)
1 parent 68bc174 commit c20ff86

3 files changed

Lines changed: 571 additions & 2 deletions

File tree

examples/cs.config.sample

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
%% Sample config file for Riak CS basho_bench benchmarking
2+
3+
%% About rate limiting via the `mode` setting: the `mode` rate is
4+
%% valid for the basho_bench_driver_cs plugin for `get` operations.
5+
%% The `mode` rate does *not* apply to `insert` operations.
6+
%% The driver does *not* support `update` operations
7+
8+
{mode, max}.
9+
%{mode, {rate,4}}.
10+
{duration, 1}.
11+
{concurrent, 1}.
12+
{report_interval, 1}.
13+
14+
{driver, basho_bench_driver_cs}.
15+
16+
%% Replace this with a user you have created.
17+
%% Instructions to create a user are here:
18+
%% https://github.com/basho/riak_cs/wiki/Creating-a-User
19+
{cs_access_key, "ZG7SS3ZPECF-8LZOEBMA"}.
20+
{cs_secret_key, "21HoIRdeO617nJrIbam9mKH2MBxmcsMEwESvmQ=="}.
21+
{cs_bucket, "test"}. % create this with s3cmd before running basho_bench!
22+
{cs_disconnect_frequency, 5}. % # ops before disconnecting HTTP socket
23+
{cs_raw_ip, "s3.amazonaws.com"}. % DO NOT CHANGE
24+
{cs_raw_port, 80}. % DO NOT CHANGE
25+
%% Replace these with your HTTP proxy's location (i.e. Riak CS)
26+
{cs_http_proxy_host, [{"localhost", 8080}, {"127.0.0.1", 8080}, {{127,0,0,1}, 8080}]}.
27+
{cs_http_proxy_port, 8080}.
28+
{cs_request_timeout, 999999000}.
29+
% If using the cs_measurement_units option, you need to change
30+
% any R graph's labels of the Y axis, e.g. basho_bench's Makefile target
31+
% "make mbyte_sec-results"
32+
{cs_measurement_units, mbyte_sec}.
33+
34+
{key_generator, {int_to_str, {partitioned_sequential_int, 1000}}}.
35+
%{key_generator, {int_to_str, {uniform_int, 1000}}}.
36+
%% See comments in source code for bigfile_valgen() function for full
37+
%% explanation of the proplist below.
38+
{value_generator, {function, basho_bench_driver_cs, bigfile_valgen,
39+
[[{file_size, 8001001},
40+
{ibrowse_chunk_size, 1000000},
41+
{max_rate_per_chunk, 50}]]}}.
42+
43+
%% NOTE: It's not a good idea to mix insert & get ops in a single
44+
%% basho_bench instance with this driver.
45+
%% Use separate ones instead!
46+
%% bad idea: {operations, [{insert, 1}, {get, 1}]}.
47+
{operations, [{insert, 1}]}.
48+
%{operations, [{get, 1}]}.

rebar.config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
%% weighed.
1111
{folsom, ".*", {git, "git://github.com/basho/folsom.git", {branch, "boundary-0.7.1+basho-bench-float"}}},
1212

13-
{lager, "1.*", {git, "git://github.com/basho/lager", {tag, "1.2.1"}}},
13+
{lager, "1.*", {git, "git://github.com/basho/lager", {tag, "1.2.2"}}},
1414
{ibrowse, ".*",
1515
{git, "git://github.com/cmullaparthi/ibrowse.git", {tag, "v3.0.4"}}},
1616
{casbench, "0.1",
@@ -24,14 +24,15 @@
2424
{git, "git://github.com/basho/riak-erlang-client", {tag, "1.2.1"}}},
2525
{mochiweb, "1.5.1",
2626
{git, "git://github.com/basho/mochiweb", {tag, "1.5.1-riak-1.0.x-fixes"}}},
27+
{velvet, "1.3.*", {git, "git://github.com/basho/velvet", {tag, "1.3.0"}}},
2728
{getopt, ".*",
2829
{git, "git://github.com/jcomellas/getopt", {tag, "v0.4"}}}
2930
]}.
3031

3132
{erl_opts, [{src_dirs, [src]},
3233
{parse_transform, lager_transform}]}.
3334

34-
{escript_incl_apps, [lager, getopt, bear, folsom, ibrowse, riakc, mochiweb, protobuffs ]}.
35+
{escript_incl_apps, [lager, getopt, bear, folsom, ibrowse, riakc, mochiweb, protobuffs, velvet]}.
3536

3637
%% Uncomment to use the Java client bench driver
3738
%% {escript_emu_args, "%%! -name bb@127.0.0.1 -setcookie YOUR_ERLANG_COOKIE\n"}.

0 commit comments

Comments
 (0)