Skip to content

Commit

Permalink
Added support to expose query response stat: timeUsedMs (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayesh-Asrani authored Jan 12, 2024
1 parent d4f1665 commit b43b5d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pinotdb/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ def __init__(
self.schema = None
self.rowcount = -1
self._results = None
self.timeUsedMs = -1
self._debug = debug
self._preserve_types = preserve_types
self._use_multistage_engine = use_multistage_engine
Expand Down Expand Up @@ -405,6 +406,7 @@ def normalize_query_response(self, input_query, query_response):

num_servers_responded = payload.get("numServersResponded", -1)
num_servers_queried = payload.get("numServersQueried", -1)
self.timeUsedMs = payload.get("timeUsedMs", -1)

self.check_sufficient_responded(
input_query, num_servers_queried, num_servers_responded
Expand Down

0 comments on commit b43b5d1

Please sign in to comment.