class_docstr: Benchmarks to compare effect of different paramemter values on the performance.
class_docstr_tok: ["Benchmarks","to","compare","effect","of","different","paramemter","values","on","the","performance","."]
code: def _benchmark_interleave(self, num_parallel_calls, buffer_size):
      k = 1024 * 1024
      dataset = dataset_ops.Dataset.from_tensors(
          (np.random.rand(1, 4 * k), np.random.rand(4 * k, 1))
      ).repeat()
      dataset = dataset.map(math_ops.matmul)
      dataset = dataset.map(map_function)
      dataset = (
          dataset_ops.Dataset.range(1)
          .repeat()
          .interleave(
              lambda _: dataset,  # pylint: disable=cell-var-from-loop
              cycle_length=10,
              num_parallel_calls=num_parallel_calls,
          )
      )
      dataset = dataset.prefetch(buffer_size=buffer_size)
      dataset = dataset.apply(testing.sleep(int(input_sleep_ms * 1000)))
  
      name_str = (
          "interleave_max_output_sleep_ms_%.2f_input_sleep_ms_%.2f"
          "_num_parallel_calls_%d_buffer_size_%d"
      )
      return self.run_and_report_benchmark(
          dataset=dataset,
          num_elements=10000,
          name=name_str
          % (
              max_output_sleep_ms,
              input_sleep_ms,
              num_parallel_calls,
              buffer_size,
          ),
      )
  
file_path: tensorflow-upstream/tensorflow/python/data/experimental/benchmarks/parameter_value_benchmark.py
imports: import time
  import numpy
  from tensorflow.python.data.benchmarks import benchmark_base
  from tensorflow.python.data.experimental.ops import testing
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import script_ops
label_desc: Use image node_id 5 for calling the ParameterValueBenchmark obj's underlying member method code with example usage: obj._benchmark_interleave(num_parallel_calls, buffer_size) and returns: self