Add performance/profiling test (#424)
* Add performance/profiling test Add test to perf_SUITE to do performance tests and also profile different activities in leveled. This can then be used to highlight functions with unexpectedly high execution times, and prove the impact of changes. Switch between riak_ctperf and riak_fullperf to change from standard test (with profile option) to full-scale performance test * Change shape of default perfTest * Change fullPerf Change the fullPerf test to run more tests, but with fewer keys. Given that RS of 512 is being pushed in Riak, 2M objects is till a 300M+ object cluster. 10M >> 1B. so these are still reasonable sizes to test. A profilePerf test also added to generate all the profiles base don 2M objects. * Extend test Queries where previously all returning a large number of index entries - changes made to make number of entries per query more realistic. Also an update process added to show difference between loading and rotating keys. * Relabel as AAE fold * Test v5 Test mini-queries - where generally a small number of entries are returned * Default to ctperf
This commit is contained in:
parent
9bff70eedb
commit
49490c38ef
7 changed files with 683 additions and 79 deletions
|
@ -201,6 +201,8 @@
|
|||
sst_rootpath/1,
|
||||
sst_filename/3]).
|
||||
|
||||
-export([pcl_getsstpids/1, pcl_getclerkpid/1]).
|
||||
|
||||
-ifdef(TEST).
|
||||
-export([
|
||||
clean_testdir/1]).
|
||||
|
@ -614,6 +616,18 @@ pcl_addlogs(Pid, ForcedLogs) ->
|
|||
pcl_removelogs(Pid, ForcedLogs) ->
|
||||
gen_server:cast(Pid, {remove_logs, ForcedLogs}).
|
||||
|
||||
-spec pcl_getsstpids(pid()) -> list(pid()).
|
||||
%% @doc
|
||||
%% Used for profiling in tests - get a list of SST PIDs to profile
|
||||
pcl_getsstpids(Pid) ->
|
||||
gen_server:call(Pid, get_sstpids).
|
||||
|
||||
-spec pcl_getclerkpid(pid()) -> pid().
|
||||
%% @doc
|
||||
%% Used for profiling in tests - get the clerk PID to profile
|
||||
pcl_getclerkpid(Pid) ->
|
||||
gen_server:call(Pid, get_clerkpid).
|
||||
|
||||
%%%============================================================================
|
||||
%%% gen_server callbacks
|
||||
%%%============================================================================
|
||||
|
@ -965,7 +979,11 @@ handle_call(check_for_work, _From, State) ->
|
|||
{_WL, WC} = leveled_pmanifest:check_for_work(State#state.manifest),
|
||||
{reply, WC > 0, State};
|
||||
handle_call(persisted_sqn, _From, State) ->
|
||||
{reply, State#state.persisted_sqn, State}.
|
||||
{reply, State#state.persisted_sqn, State};
|
||||
handle_call(get_sstpids, _From, State) ->
|
||||
{reply, leveled_pmanifest:get_sstpids(State#state.manifest), State};
|
||||
handle_call(get_clerkpid, _From, State) ->
|
||||
{reply, State#state.clerk, State}.
|
||||
|
||||
handle_cast({manifest_change, Manifest}, State) ->
|
||||
NewManSQN = leveled_pmanifest:get_manifest_sqn(Manifest),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue