diff options
author | Garren Smith <garren.smith@gmail.com> | 2019-03-28 11:37:42 +0200 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2019-03-28 11:37:42 +0200 |
commit | 383c96a65badc7203df29b44bb9afa5f729e7eeb (patch) | |
tree | 250f100c5161001add0d64750116dcf674dc4e1f | |
parent | 33ee6c29a4da410580ce40995862ee3a15ed1ee4 (diff) | |
download | couchdb-383c96a65badc7203df29b44bb9afa5f729e7eeb.tar.gz |
add stats for search
-rw-r--r-- | src/dreyfus_httpd.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dreyfus_httpd.erl b/src/dreyfus_httpd.erl index b5c1f2736..b6dd6134e 100644 --- a/src/dreyfus_httpd.erl +++ b/src/dreyfus_httpd.erl @@ -514,7 +514,9 @@ get_view_partition_option(#doc{body = {Props}}, Default) -> hits_to_json(DbName, IncludeDocs, Hits) -> {Ids, HitData} = lists:unzip(lists:map(fun get_hit_data/1, Hits)), + chttpd_stats:incr_rows(length(Hits)), if IncludeDocs -> + chttpd_stats:incr_reads(length(Hits)), {ok, JsonDocs} = dreyfus_fabric:get_json_docs(DbName, Ids), lists:zipwith(fun(Hit, {Id, Doc}) -> case Hit of |