Improve perf_SUITE test (#445)

* Improve perf_SUITE test

The update teat is refactored so as not to generate. a large KV list which dominates the memory utilisation.

The update and the get tests changes to do a head before each operation - which emulates how this will work in RIAK.

* Revert default setting change

* Don't pre-calculate key list

For fetches - reduces memory required for test process not database (and consequent distortion to measured results)

* Tidy ++ in tests

Removes some rogue results from profile

* Update testutil.erl

* Test fixes

* Tidy generate_chunk for profiling

* Revert "Tidy generate_chunk for profiling"

This reverts commit 1f6cff446ca6b9855f1e3aa732b32e0e5c14c9a5.

* Resize profile test
This commit is contained in:
Martin Sumner 2024-09-02 11:17:35 +01:00 committed by GitHub
parent 7b5b18ed06
commit acf30599e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 181 additions and 81 deletions

View file

@ -302,13 +302,7 @@ split_builder_speed_tester() ->
Timings =
lists:map(
fun(HashList) ->
SlotCount =
case length(HashList) of
0 ->
0;
L ->
min(128, max(2, (L - 1) div 512))
end,
SlotCount = min(128, max(2, (length(HashList) - 1) div 512)),
InitTuple = list_to_tuple(lists:duplicate(SlotCount, [])),
{MTC, SlotHashes} =
timer:tc(

View file

@ -32,8 +32,12 @@
]).
%% Exported for testing purposes
-export([riak_metadata_to_binary/2,
riak_extract_metadata/2]).
-export(
[
riak_metadata_to_binary/2,
riak_extract_metadata/2,
get_indexes_from_siblingmetabin/2
]).
-define(MAGIC, 53). % riak_kv -> riak_object

View file

@ -74,7 +74,7 @@
% At o(10) trillion keys behaviour may become increasingly
% difficult to predict.
-if(OTP_RELEASE >= 25).
-if(?OTP_RELEASE >= 25).
-if(length(?LEVEL_SCALEFACTOR) /= ?MAX_LEVELS).
-error("length ?LEVEL_SCALEFACTOR differs from ?MAX_LEVELS").
-endif.