summaryrefslogtreecommitdiff
path: root/src/dreyfus/src/dreyfus_rpc.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/dreyfus/src/dreyfus_rpc.erl')
-rw-r--r--src/dreyfus/src/dreyfus_rpc.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dreyfus/src/dreyfus_rpc.erl b/src/dreyfus/src/dreyfus_rpc.erl
index 2ebc5ffe5..4c2e64a8b 100644
--- a/src/dreyfus/src/dreyfus_rpc.erl
+++ b/src/dreyfus/src/dreyfus_rpc.erl
@@ -48,9 +48,12 @@ call(Fun, DbName, DDoc, IndexName, QueryArgs0) ->
{ok, Index} ->
case dreyfus_index_manager:get_index(DbName, Index) of
{ok, Pid} ->
+ T0 = erlang:monotonic_time(),
case dreyfus_index:await(Pid, MinSeq) of
{ok, IndexPid, _Seq} ->
+ T1 = erlang:monotonic_time(),
Result = dreyfus_index:Fun(IndexPid, QueryArgs),
+ rexi:reply({await_time, T1 - T0}),
rexi:reply(Result);
% obsolete clauses, remove after upgrade
ok ->