class_docstr: Unit test for PerformanceProfiler.
class_docstr_tok: ["Unit","test","for","PerformanceProfiler","."]
code: def test_tracer_filter(self):
      def filter_func(x, y):
          return x > 10 and y > 5
  
      pipe0 = (
          pipe.input("a", "b", "c")
          .map("c", "c", lambda x: x + 1)
          .filter("c", "d", ("a", "b"), filter_func)
          .output("a", "b", "c", "d")
      )
      v1 = pipe0.debug(5, 6, 7, profiler=True)
      v2 = pipe0.debug(15, 6, 7, profiler=True)
  
      pp1 = v1.profiler
      pp2 = v2.profiler
      self.assertEqual(len(pp1.pipes_profiler), 1)
      self.assertEqual(len(pp1.node_report), 4)
      pp1.show()
  
      path1 = public_path / "pipe1.json"
      pp1.dump(path1)
      with open(path1, encoding="utf-8") as f:
          json_tracing2 = json.load(f)
      self.assertEqual(len(json_tracing2), 43)
  
      path2 = public_path / "pipe2.json"
      pp2.dump(path2)
      with open(path2, encoding="utf-8") as f:
          json_tracing2 = json.load(f)
      self.assertEqual(len(json_tracing2), 43)
  
      path1.unlink()
      path2.unlink()
  
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 6 for calling the TestPerformanceProfiler obj's underlying member method code with example usage: obj.test_tracer_filter() and returns: unknown