Skip to content

Commit ad30bfa

Browse files
committed
Adjust custom name of metric to avoid overlap with vespa name
1 parent b2fd49b commit ad30bfa

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

venra/query.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,24 @@ def extract_metrics(qresults):
6565
from the query response.
6666
"""
6767
qmet = {}
68+
69+
# Total number of matched docs for the query
6870
qmet["matchcount"] = qresults["root"]["fields"]["totalCount"]
69-
qmet["doccount"] = qresults["root"]["coverage"]["documents"]
71+
72+
# Total number of documents for the queried doc type(s)
73+
qmet["fullcount"] = qresults["root"]["coverage"]["documents"]
74+
75+
# The percentage of the total number of docs covered during query exec
7076
qmet["coverage"] = qresults["root"]["coverage"]["coverage"]
77+
78+
# Internal phase timings
7179
if "timing" in qresults:
7280
qmet["querytime"] = qresults["timing"]["querytime"]
7381
qmet["searchtime"] = qresults["timing"]["searchtime"]
7482
qmet["summaryfetchtime"] = qresults["timing"]["summaryfetchtime"]
83+
7584
qmet["elapsed_ms"] = round(1000 * qresults["venra"]["elapsed_ms"], 3)
85+
7686
return qmet
7787

7888

0 commit comments

Comments
 (0)