class_docstr: Benchmark that compares various ways of running tf.data benchmarks.
class_docstr_tok: ["Benchmark","that","compares","various","ways","of","running","tf.data","benchmarks","."]
code: def report(self, deltas):
      # Each `delta` is the time taken for `self.iters` iterations. Divide by the
      # number of iterations here to get per-element iteration time.
      deltas = np.array(deltas) / self.iters
      # Discard the first 5 results from "warming up" the session.
      deltas = deltas[5:]
  
      median = np.median(deltas)
      mean = np.mean(deltas)
      min_val = np.min(deltas)
      max_val = np.max(deltas)
      extras = {
          "iters_per_second": 1 / median,
          "median": median,
          "mean": mean,
          "min": min_val,
          "max": max_val,
          "num_reps": self.num_reps - 5,
      }
      self.report_benchmark(
          wall_time=median, iters=self.iters, extras=extras
      )
  
imports: import timeit
  import numpy
  from tensorflow.python.client import session
  from tensorflow.python.data.experimental.ops import testing
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.eager import context
  from tensorflow.python.platform import test
label_desc: Use image node_id 11 for calling the MetaBenchmark obj's underlying member method code with example usage: obj.report(deltas) without return types