class_docstr: run search
class_docstr_tok: ["run","search"]
code: def run_case(self, case_metric, **case_param):
      # index_field_name = case_param["index_field_name"]
      run_count = case_param["run_count"]
      avg_query_time = 0.0
      min_query_time = 0.0
      total_query_time = 0.0
      for i in range(run_count):
          logger.debug(
              "Start run query, run %d of %s" % (i + 1, run_count)
          )
          start_time = time.time()
          _query_res = self.milvus.query(
              case_param["vector_query"],
              filter_query=case_param["filter_query"],
              guarantee_timestamp=case_param["guarantee_timestamp"],
          )
          interval_time = time.time() - start_time
          total_query_time += interval_time
          if (i == 0) or (min_query_time > interval_time):
              min_query_time = round(interval_time, 2)
      avg_query_time = round(total_query_time / run_count, 2)
      tmp_result = {
          "search_time": min_query_time,
          "avc_search_time": avg_query_time,
      }
      return tmp_result
  
file_path: milvus/tests/benchmark/milvus_benchmark/runners/search.py
imports: import time
  import copy
  import json
  import logging
  from milvus_benchmark import parser
  from milvus_benchmark.runners import utils
  from milvus_benchmark.runners.base import BaseRunner
label_desc: Use image node_id 4 for calling the SearchRunner obj's underlying member method code with example usage: obj.run_case(case_metric) and returns: tmp_result