aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2018-12-19 14:24:28 +0100
committerRaimo Niskanen <[email protected]>2019-01-14 14:21:23 +0100
commita5c1cd352976d58577516c6d7b1db45c30f908ab (patch)
treedd81c620a99c96ee5c7d28ccb73088ede27c60f8 /lib/stdlib/test
parent0211d244886bf09c2262c55bdf8a9b7c29280e89 (diff)
downloadotp-a5c1cd352976d58577516c6d7b1db45c30f908ab.tar.gz
otp-a5c1cd352976d58577516c6d7b1db45c30f908ab.tar.bz2
otp-a5c1cd352976d58577516c6d7b1db45c30f908ab.zip
Modify generic_statem_transit benchmark
Instead of just changing states; also start a state_timeout that gets cancelled by the state change. I think it is important to have efficient timer handling.
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/stdlib_bench_SUITE_data/generic_statem.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/stdlib/test/stdlib_bench_SUITE_data/generic_statem.erl b/lib/stdlib/test/stdlib_bench_SUITE_data/generic_statem.erl
index cfeb974abd..b106619568 100644
--- a/lib/stdlib/test/stdlib_bench_SUITE_data/generic_statem.erl
+++ b/lib/stdlib/test/stdlib_bench_SUITE_data/generic_statem.erl
@@ -52,7 +52,9 @@ init(Data) ->
state1({call, From}, {reply, M}, Data) ->
{keep_state, Data, {reply, From, M}};
state1({call, From}, {transit, M}, Data) ->
- {next_state, state2, Data, {reply, From, M}}.
+ {next_state, state2, Data,
+ [{reply, From, M},{state_timeout,5000,5000}]}.
state2({call, From}, {transit, M}, Data) ->
- {next_state, state1, Data, {reply, From, M}}.
+ {next_state, state1, Data,
+ [{reply, From, M},{state_timeout,5000,5000}]}.