class_docstr: Benchmarks for `tf.data.Dataset.filter()`.
code: def _benchmark(self, predicate, name, benchmark_id):
      num_elements = 100000
      dataset = dataset_ops.Dataset.from_tensors(True)
      dataset = dataset.repeat().filter(predicate)
      self.run_and_report_benchmark(
          dataset,
          num_elements=num_elements,
          extras={
              "model_name": "filter.benchmark.%d" % benchmark_id,
              "parameters": "%d" % num_elements,
          },
          name=name,
      )
  
file_path: tensorflow-upstream/tensorflow/python/data/benchmarks/filter_benchmark.py
imports: from tensorflow.python.data.benchmarks import benchmark_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.ops import array_ops
label_desc: Use image node_id 1 for calling the FilterBenchmark obj's underlying member method code with example usage: obj._benchmark(predicate, name, benchmark_id) without return types