couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [33/50] ibrowse commit: updated refs/heads/upstream to b28542d
Date Mon, 22 Aug 2016 11:19:59 GMT
fix tests


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ibrowse/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ibrowse/commit/8734ed3d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ibrowse/tree/8734ed3d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ibrowse/diff/8734ed3d

Branch: refs/heads/upstream
Commit: 8734ed3d0db57079a220060a19c082cb2b56a6dd
Parents: 1439ab0
Author: benoitc <bchesneau@gmail.com>
Authored: Fri Nov 6 11:42:42 2015 +0100
Committer: benoitc <bchesneau@gmail.com>
Committed: Fri Nov 6 11:42:42 2015 +0100

----------------------------------------------------------------------
 test/ibrowse_load_test.erl | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ibrowse/blob/8734ed3d/test/ibrowse_load_test.erl
----------------------------------------------------------------------
diff --git a/test/ibrowse_load_test.erl b/test/ibrowse_load_test.erl
index 5ff308e..eef0aaf 100644
--- a/test/ibrowse_load_test.erl
+++ b/test/ibrowse_load_test.erl
@@ -36,11 +36,11 @@ start_1(Num_workers, Num_requests, Max_sess) ->
                                                  {one_request_only, 0}
                                                 ]),
         ibrowse:set_max_sessions("localhost", 8081, Max_sess),
-        Start_time    = now(),
+        Start_time    = os:timestamp(),
         Workers       = spawn_workers(Num_workers, Num_requests),
         erlang:send_after(1000, self(), print_diagnostics),
         ok            = wait_for_workers(Workers),
-        End_time      = now(),
+        End_time      = os:timestamp(),
         Time_in_secs  = trunc(round(timer:now_diff(End_time, Start_time) / 1000000)),
         Req_count     = Num_workers * Num_requests,
         [{_, Success_count}] = ets:lookup(?ibrowse_load_test_counters, success),
@@ -95,7 +95,7 @@ spawn_workers(0, _Num_requests, _Parent, Acc) ->
     lists:reverse(Acc);
 spawn_workers(Num_workers, Num_requests, Parent, Acc) ->
     Pid_ref = spawn_monitor(fun() ->
-                                    random:seed(now()),
+                                    random:seed(os:timestamp()),
                                     case catch worker_loop(Parent, Num_requests) of
                                         {'EXIT', Rsn} ->
                                             io:format("Worker crashed with reason: ~p~n",
[Rsn]);
@@ -150,11 +150,11 @@ worker_loop(Parent, N) ->
               _ ->
                   "http://localhost:8081/blah"
           end,
-    Start_time = now(),
+    Start_time = os:timestamp(),
     Res = ibrowse:send_req(Url, [], get),
-    End_time = now(),
+    End_time = os:timestamp(),
     Time_taken = trunc(round(timer:now_diff(End_time, Start_time) / 1000)),
-    ets:insert(ibrowse_load_timings, {now(), Time_taken}),
+    ets:insert(ibrowse_load_timings, {os:timestamp(), Time_taken}),
     case Res of
         {ok, "200", _, _} ->
             ets:update_counter(?ibrowse_load_test_counters, success, 1);


Mime
View raw message