diff options
author | Rickard Green <[email protected]> | 2016-06-23 13:31:37 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-06-27 17:02:41 +0200 |
commit | 832985da5c5ca3f7635d77aaa31904d79adeb37e (patch) | |
tree | 57f0f25a2f7fea122b2ed92e3e497bbad7c4bf93 /erts/emulator/test/statistics_SUITE.erl | |
parent | 7da791e738fbde05bbd6b881c940e896a217ef91 (diff) | |
download | otp-832985da5c5ca3f7635d77aaa31904d79adeb37e.tar.gz otp-832985da5c5ca3f7635d77aaa31904d79adeb37e.tar.bz2 otp-832985da5c5ca3f7635d77aaa31904d79adeb37e.zip |
Cleanup in statistics_SUITE:runtime_update test
Diffstat (limited to 'erts/emulator/test/statistics_SUITE.erl')
-rw-r--r-- | erts/emulator/test/statistics_SUITE.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/erts/emulator/test/statistics_SUITE.erl b/erts/emulator/test/statistics_SUITE.erl index 4a07c6a10a..a1f12ba93c 100644 --- a/erts/emulator/test/statistics_SUITE.erl +++ b/erts/emulator/test/statistics_SUITE.erl @@ -129,11 +129,15 @@ do_runtime_update(0) -> {comment,"Never close enough"}; do_runtime_update(N) -> {T1,Diff0} = statistics(runtime), - spawn_link(fun cpu_heavy/0), + {CPUHog, CPUHogMon} = spawn_opt(fun cpu_heavy/0,[link,monitor]), receive after 1000 -> ok end, {T2,Diff} = statistics(runtime), + unlink(CPUHog), + exit(CPUHog, kill), + true = is_integer(T1+T2+Diff0+Diff), io:format("T1 = ~p, T2 = ~p, Diff = ~p, T2-T1 = ~p", [T1,T2,Diff,T2-T1]), + receive {'DOWN',CPUHogMon,process,CPUHog,_} -> ok end, if T2 - T1 =:= Diff, 900 =< Diff, Diff =< 1500 -> ok; true -> do_runtime_update(N-1) @@ -321,6 +325,7 @@ scheduler_wall_time(Config) when is_list(Config) -> end, [KillHog(Pid) || Pid <- [P1|HalfHogs++LastHogs]], AfterLoad = get_load(), + io:format("AfterLoad=~p~n", [AfterLoad]), {false,_} = {lists:any(fun(Load) -> Load > 25 end, AfterLoad),AfterLoad}, true = erlang:system_flag(scheduler_wall_time, false) after |