code: def _main(args):
      logging.basicConfig()
      args = _parse_args(args)
  
      if args.v:
          logging.getLogger().setLevel(logging.INFO)
      if args.vv:
          logging.getLogger().setLevel(logging.DEBUG)
  
      results = reader_throughput(
          args.dataset_path,
          args.field_regex,
          warmup_cycles_count=args.warmup_cycles,
          measure_cycles_count=args.measure_cycles,
          pool_type=args.pool_type,
          loaders_count=args.workers_count,
          profile_threads=args.profile_threads,
          read_method=args.read_method,
          shuffling_queue_size=args.shuffling_queue_size,
          min_after_dequeue=args.min_after_dequeue,
      )
  
      logger.info("Done")
      print(
          "Average sample read rate: {:1.2f} samples/sec; RAM {:1.2f} MB (rss); "
          "CPU {:1.2f}%".format(
              results.samples_per_second,
              results.memory_info.rss / 2**20,
              results.cpu,
          )
      )
  
file_path: petastorm/petastorm/benchmark/cli.py
imports: from __future__ import division
  from __future__ import print_function
  import argparse
  import logging
  import sys
  from petastorm.benchmark.throughput import reader_throughput, WorkerPoolType, ReadMethod
label_desc: Use image node_id 2 for calling a global function with example usage: _main(args) without return types