Skip to content

Commit 5ee943d

Browse files
committed
Add valgen to keygen adapter
Using this for a test that requires control of key length and # of keys, for which I'm concatenating a binary value generator and int gens
1 parent 15e6749 commit 5ee943d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/basho_bench_keygen.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ new({function, Module, Function, Args}, Id) ->
9999
_Error ->
100100
?FAIL_MSG("Could not find keygen function: ~p:~p\n", [Module, Function])
101101
end;
102+
%% Adapt a value generator. The function keygen would work if Id was added as
103+
%% the last parameter. But, alas, it is added as the first.
104+
new({valgen, ValGen}, Id) ->
105+
basho_bench_valgen:new(ValGen, Id);
102106
new(Bin, _Id) when is_binary(Bin) ->
103107
fun() -> Bin end;
104108
new(Other, _Id) ->

0 commit comments

Comments
 (0)