class_docstr: Test case of performance 
docstr: target: test embedding for performance scenario
  method: embedding N times and calculate the average embedding time 
  expected: return embeddings
docstr_tok: ["target",":","test","embedding","for","performance","scenario","method",":","embedding","N","times","and","calculate","the","average","embedding","time","expected",":","return","embeddings"]
code: def test_embedding_avg_time(self, pipeline_model, embedding_size):
      """
      target: test embedding for performance scenario
      method: embedding N times and calculate the average embedding time
      expected: return embeddings
      """
      emb_conf = AutoConfig.load_config(pipeline_name)
      emb_conf.model = pipeline_model
      emb_pipe = AutoPipes.pipeline(pipeline_name, emb_conf)
      time_cost = []
      num = 10
      for i in range(num):
          try:
              time_start = time.time()
              embedding = (
                  emb_pipe(data_path + "towhee_test_image0.jpg")
                  .to_list()[0][0]
                  .tolist()
              )
              time_cost.append(time.time() - time_start)
              assert len(embedding) == embedding_size
          except Exception as e:
              print("Raise Exception: %s" % e)
          print("embedding images for %d round" % (i + 1))
      time_cost = np.array(time_cost)
      total_time = np.sum(time_cost)
      print(f"The total time is", total_time)
      avg_time = round(total_time / num, 3)
      print(f"The average time is", avg_time)
  
      return True
  
imports: import sys
  import time
  import threading
  import numpy
  from towhee import AutoPipes, AutoConfig
  from common import common_func
label_desc: Use image node_id 1 for calling the TestImageEmbeddingPerformance obj's underlying member method code with example usage: obj.test_embedding_avg_time(pipeline_model, embedding_size) and returns: True