From b43b5d11dc164bd702bbde0c4b23cc674b4003db Mon Sep 17 00:00:00 2001 From: Jayesh-Asrani <42716184+Jayesh-Asrani@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:33:22 +0530 Subject: [PATCH] Added support to expose query response stat: timeUsedMs (#87) --- pinotdb/db.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pinotdb/db.py b/pinotdb/db.py index ccd95b3..9b39d56 100644 --- a/pinotdb/db.py +++ b/pinotdb/db.py @@ -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 @@ -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