class_docstr: Unit test for PerformanceProfiler.
class_docstr_tok: ["Unit","test","for","PerformanceProfiler","."]
code: def test_check(self):
      p = pipe.input("a").output("a")
      v = p.debug(1, profiler=True)
      time_profiler = v.profiler._time_prfilers[0]
      time_profiler.record("_run_pipe", "pipe_out")
      with self.assertRaises(BaseException):
          _ = PerformanceProfiler(
              time_profiler.time_record,
              p._dag_repr.to_dict().get("nodes"),
          )
  
imports: import json
  import unittest
  from pathlib import Path
  from towhee import pipe
  from towhee import ops, register
  from towhee.runtime.time_profiler import TimeProfiler
  from towhee.tools.profilers import PerformanceProfiler
label_desc: Use image node_id 1 for calling the TestPerformanceProfiler obj's underlying member method code with example usage: obj.test_check() without return types