Add compatibility for old and new random / rand functions

This commit is contained in:
Heinz N. Gies 2017-07-31 20:20:39 +02:00
parent a49d3bbfec
commit 25389893cf
22 changed files with 125 additions and 74 deletions

View file

@ -254,9 +254,9 @@ generate_randomkeys(Seqn, Count, BucketRangeLow, BucketRangeHigh) ->
generate_randomkeys(_Seqn, 0, Acc, _BucketLow, _BucketHigh) ->
Acc;
generate_randomkeys(Seqn, Count, Acc, BucketLow, BRange) ->
BNumber = string:right(integer_to_list(BucketLow + random:uniform(BRange)),
BNumber = string:right(integer_to_list(BucketLow + leveled_rand:uniform(BRange)),
4, $0),
KNumber = string:right(integer_to_list(random:uniform(1000)), 4, $0),
KNumber = string:right(integer_to_list(leveled_rand:uniform(1000)), 4, $0),
{K, V} = {{o, "Bucket" ++ BNumber, "Key" ++ KNumber, null},
{Seqn, {active, infinity}, null}},
generate_randomkeys(Seqn + 1,
@ -392,4 +392,4 @@ with_index_test2() ->
_R1 = lists:foldl(CheckFun, {L0Index, TreeList}, SrcKVL).
-endif.
-endif.