diff options
author | Ingela Anderton Andin <ingela@erlang.org> | 2019-11-26 10:16:20 +0100 |
---|---|---|
committer | Ingela Anderton Andin <ingela@erlang.org> | 2019-11-26 10:16:20 +0100 |
commit | 7b0e7ed3de924bcd73f309889a02765d53a3b814 (patch) | |
tree | a55ff558127a454aa9ccf96fcc3d5819af89949d | |
parent | 4d105778fefc48e132248890b80e6eac999798eb (diff) | |
download | erlang-7b0e7ed3de924bcd73f309889a02765d53a3b814.tar.gz |
inets: Remove legacy code
Use module rand instead of random
-rw-r--r-- | lib/inets/examples/httpd_load_test/hdlt_random_html.erl | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/inets/examples/httpd_load_test/hdlt_random_html.erl b/lib/inets/examples/httpd_load_test/hdlt_random_html.erl index 3b72d27f06..75b01fede0 100644 --- a/lib/inets/examples/httpd_load_test/hdlt_random_html.erl +++ b/lib/inets/examples/httpd_load_test/hdlt_random_html.erl @@ -23,10 +23,6 @@ -export([page/3]). page(SessionID, _Env, Input) -> -%% log("page(~p) -> deliver content-type when" -%% "~n SessionID: ~p" -%% "~n Env: ~p" -%% "~n Input: ~p", [self(), SessionID, Env, Input]), [WorkSimStr, SzSimStr] = string:tokens(Input, [$:]), WorkSim = list_to_integer(WorkSimStr), SzSim = list_to_integer(SzSimStr), @@ -49,15 +45,5 @@ stop() -> ". content(WorkSim, SzSim) -> - {A, B, C} = {erlang:phash2([node()]), - inets_time_compat:monotonic_time(), - inets_time_compat:unique_integer()}, - - random:seed(A, B, C), - lists:sort([random:uniform(X) || X <- lists:seq(1, WorkSim)]), + lists:sort([rand:uniform(X) || X <- lists:seq(1, WorkSim)]), lists:flatten(lists:duplicate(SzSim, "Dummy data ")). - -%% log(F, A) -> -%% hdlt_logger:set_name("HDLT RANDOM-HTML"), -%% hdlt_logger:set_level(debug), -%% hdlt_logger:log(F, A). |