MCPcopy Create free account
hub / github.com/cosdata/cosdata / timed_query

Function timed_query

tests/test-tf-idf-ndcg.py:270–275  ·  view source on GitHub ↗
(query: str)

Source from the content-addressed store, hash-verified

268 futures = []
269
270 def timed_query(query: str) -> Tuple[List[Tuple[int, float]], float]:
271 start = time.perf_counter()
272 response = search_document(collection, query, top_k)
273 end = time.perf_counter()
274 latency = (end - start) * 1000.0
275 return response, latency
276
277 for query in queries:
278 futures.append(executor.submit(timed_query, query))

Callers

nothing calls this directly

Calls 1

search_documentFunction · 0.85

Tested by

no test coverage detected