code: def bench_func(self, name, func, *args, **kwargs):
          Benchmark func(*args)."""
  
          inner_loops = kwargs.pop('inner_loops', None)
          metadata = kwargs.pop('metadata', None)
          self._no_keyword_argument(kwargs)
  
          if not self._check_worker_task():
              return None
  
          if args:
              func = functools.partial(func, *args)
  
          def task_func(task, loops):
              # use fast local variables
              local_timer = perf.perf_counter
              local_func = func
              if loops != 1:
                  range_it = range(loops)
  
                  t0 = local_timer()
                  for _ in range_it:
                      local_func()
                  dt = local_timer() - t0
              else:
                  t0 = local_timer()
                  local_func()
                  dt = local_timer() - t0
  
              return dt
  
          task = WorkerProcessTask(self, name, task_func, metadata)
          task.inner_loops = inner_loops
          return self._main(task)
docs: Benchmark func(*args).