diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-03-17 14:42:07 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-03-17 14:42:07 +0100 |
commit | 586e8f0cb587355221ed8a24c4e8ca06e8404192 (patch) | |
tree | 520db084a6ac125e6b74c1d446f3ea0bd1c10d3f /lib/percept/src/percept.erl | |
parent | 28f3bae60a4edb9432c29469f6a3c031e0859104 (diff) | |
parent | 86743354292ef497401303b6e8566b6f3f738b96 (diff) | |
download | otp-586e8f0cb587355221ed8a24c4e8ca06e8404192.tar.gz otp-586e8f0cb587355221ed8a24c4e8ca06e8404192.tar.bz2 otp-586e8f0cb587355221ed8a24c4e8ca06e8404192.zip |
Merge branch 'egil/fix-percept-now/OTP-13422'
* egil/fix-percept-now/OTP-13422:
Modernize test suites
Use monotonic_time/1 instead of now/0
Diffstat (limited to 'lib/percept/src/percept.erl')
-rw-r--r-- | lib/percept/src/percept.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/percept/src/percept.erl b/lib/percept/src/percept.erl index badb3f3d66..f1a2002c9d 100644 --- a/lib/percept/src/percept.erl +++ b/lib/percept/src/percept.erl @@ -226,7 +226,7 @@ stop_webserver(Port) -> parse_and_insert(Filename, DB) -> io:format("Parsing: ~p ~n", [Filename]), - T0 = erlang:now(), + T0 = erlang:monotonic_time(milli_seconds), Pid = dbg:trace_client(file, Filename, mk_trace_parser(self())), Ref = erlang:monitor(process, Pid), parse_and_insert_loop(Filename, Pid, Ref, DB, T0). @@ -239,8 +239,8 @@ parse_and_insert_loop(Filename, Pid, Ref, DB, T0) -> {parse_complete, {Pid, Count}} -> receive {'DOWN', Ref, process, Pid, normal} -> ok after 0 -> ok end, DB ! {action, consolidate}, - T1 = erlang:now(), - io:format("Parsed ~p entries in ~p s.~n", [Count, ?seconds(T1, T0)]), + T1 = erlang:monotonic_time(milli_seconds), + io:format("Parsed ~w entries in ~w ms.~n", [Count, T1 - T0]), io:format(" ~p created processes.~n", [length(percept_db:select({information, procs}))]), io:format(" ~p opened ports.~n", [length(percept_db:select({information, ports}))]), ok; |