diff options
author | Rickard Green <[email protected]> | 2017-05-19 16:32:41 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-05-19 16:32:41 +0200 |
commit | 507278352541fcb3a00b85bf77764ab4cf340b15 (patch) | |
tree | 5f282604fc5fc7d28a936cb18c4596b0fcc0311d /erts/emulator/test/statistics_SUITE.erl | |
parent | 3e42bb4feb6a3a90895595d53b37092f699ba4c3 (diff) | |
parent | 32ea8ba368c455afba07afd85bed6fb57879f56d (diff) | |
download | otp-507278352541fcb3a00b85bf77764ab4cf340b15.tar.gz otp-507278352541fcb3a00b85bf77764ab4cf340b15.tar.bz2 otp-507278352541fcb3a00b85bf77764ab4cf340b15.zip |
Merge branch 'rickard/ds-runqs'
OTP-14152
* rickard/ds-runqs:
Make statistics/1 aware of dirty run-queues and tasks
Diffstat (limited to 'erts/emulator/test/statistics_SUITE.erl')
-rw-r--r-- | erts/emulator/test/statistics_SUITE.erl | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/erts/emulator/test/statistics_SUITE.erl b/erts/emulator/test/statistics_SUITE.erl index 0cea941687..7690557fda 100644 --- a/erts/emulator/test/statistics_SUITE.erl +++ b/erts/emulator/test/statistics_SUITE.erl @@ -502,20 +502,37 @@ run_queues_lengths_active_tasks(_Config) -> end, lists:seq(1,10)), + + TRQLs0 = statistics(total_run_queue_lengths), + TRQLAs0 = statistics(total_run_queue_lengths_all), TATs0 = statistics(total_active_tasks), + TATAs0 = statistics(total_active_tasks_all), true = is_integer(TRQLs0), true = is_integer(TATs0), true = TRQLs0 >= 0, + true = TRQLAs0 >= 0, true = TATs0 >= 11, + true = TATAs0 >= 11, NoScheds = erlang:system_info(schedulers), + {DefRqs, + AllRqs} = case erlang:system_info(dirty_cpu_schedulers) of + 0 -> {NoScheds, NoScheds}; + _ -> {NoScheds+1, NoScheds+2} + end, RQLs0 = statistics(run_queue_lengths), + RQLAs0 = statistics(run_queue_lengths_all), ATs0 = statistics(active_tasks), - NoScheds = length(RQLs0), - NoScheds = length(ATs0), + ATAs0 = statistics(active_tasks_all), + DefRqs = length(RQLs0), + AllRqs = length(RQLAs0), + DefRqs = length(ATs0), + AllRqs = length(ATAs0), true = lists:sum(RQLs0) >= 0, + true = lists:sum(RQLAs0) >= 0, true = lists:sum(ATs0) >= 11, + true = lists:sum(ATAs0) >= 11, SO = erlang:system_flag(schedulers_online, 1), @@ -531,8 +548,8 @@ run_queues_lengths_active_tasks(_Config) -> RQLs1 = statistics(run_queue_lengths), ATs1 = statistics(active_tasks), - NoScheds = length(RQLs1), - NoScheds = length(ATs1), + DefRqs = length(RQLs1), + DefRqs = length(ATs1), TRQLs2 = lists:sum(RQLs1), TATs2 = lists:sum(ATs1), true = TRQLs2 >= 10, |