AZ568 - Add 2i driver for basho_bench #12

Merged
merged 3 commits into from Sep 9, 2011

2 participants

@rustyio

Usage:

# Run once to load the data...
./basho_bench examples/2i.config

# Modify configuration, comment out 'put' and 
# uncomment 'int_eq_query' and 'bin_eq_query' (or whatever your preference)...
$EDITOR examples/2i.config

# Run again to query...
./basho_bench examples/2i.config

# Graph the results...
make results
open tests/current/summary.png
@slfritchie

Yep, it seems to work, once Riak's default backend is configured correctly.
If not (i.e. using Bitcask):

17:23:09.787 [error] gen_fsm <0.448.0> in state active terminated with reason: no case clause matching ok in riak_core_vnode:vnode_coverage/4

I'm wondering about the garbage that normalize_binary_index() creates along the way,
but of course haven't actually measured. :-) To keep load gen overhead low, it may or
may not be beneficial to use something like:

re:replace(Value, "[^a-zA-Z0-9]", <<"_">>, [global, {return, binary}]).

And perhaps precompiling the regexp and stashing it in the b_b's plugin state doodad.

Er, no. Actually the current code is faster than re:replace(), even with a precompiled regexp.
By a healthy margin. Nevermind.

@dizzyd dizzyd commented on the diff Sep 8, 2011
examples/2i.config
+ % {int_eq_query, 1},
+ % {bin_eq_query, 1}
+
+ % {int_range_query, 1},
+ % {bin_range_query, 1}
+ ]}.
+
+{mode, max}.
+
+{duration, 1}.
+
+{concurrent, 3}.
+
+{driver, basho_bench_driver_2i}.
+
+{code_paths, ["deps/stats",
@dizzyd
dizzyd added a note Sep 8, 2011

You don't need code_paths directive any longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rustyio rustyio merged commit b80285a into master Sep 9, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment