Created
January 3, 2012 02:14
-
-
Save dreverri/1553109 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module(custom_gen). | |
-export([key/1, | |
value/1, | |
key_from_arg/2, | |
value_from_arg/2 | |
]). | |
key(_Id) -> | |
fun() -> <<"custom_key">> end. | |
value(_Id) -> | |
fun() -> <<"custom_value">> end. | |
key_from_arg(_Id, Arg) -> | |
fun() -> Arg end. | |
value_from_arg(_Id, Arg) -> | |
fun() -> Arg end. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{mode, max}. | |
{duration, 10}. | |
{concurrent, 1}. | |
{driver, basho_bench_driver_riakc_pb}. | |
{riakc_pb_ips, [{127,0,0,1}]}. | |
{riakc_pb_replies, 1}. | |
{operations, [{get, 1}, {update, 1}]}. | |
{source_dir, "src"}. | |
%% Example using a custom function for key and value generation | |
{key_generator, {function, custom_gen, key, []}}. | |
{value_generator, {function, custom_gen, value, []}}. | |
%% Example using a custom function with args | |
%% {key_generator, {function, custom_gen, key_from_arg, [<<"key_arg">>]}}. | |
%% {value_generator, {function, custom_gen, value_from_arg, [<<"value_arg">>]}}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment