code: def parse_args():
      parser = argparse.ArgumentParser(description=__doc__)
      parser.add_argument(
          "--filename",
          type=str,
          help="The name of log which need to analysis.",
      )
      parser.add_argument(
          "--log_with_profiler",
          type=str,
          help="The path of train log with profiler",
      )
      parser.add_argument(
          "--profiler_path",
          type=str,
          help="The path of profiler timeline log.",
      )
      parser.add_argument(
          "--keyword", type=str, help="Keyword to specify analysis data"
      )
      parser.add_argument(
          "--separator",
          type=str,
          default=None,
          help="Separator of different field in log",
      )
      parser.add_argument(
          "--position",
          type=int,
          default=None,
          help="The position of data field",
      )
      parser.add_argument(
          "--range",
          type=str,
          default="",
          help="The range of data field to intercept",
      )
      parser.add_argument(
          "--base_batch_size", type=int, help="base_batch size on gpu"
      )
      parser.add_argument(
          "--skip_steps",
          type=int,
          default=0,
          help="The number of steps to be skipped",
      )
      parser.add_argument(
          "--model_mode",
          type=int,
          default=-1,
          help="Analysis mode, default value is -1",
      )
      parser.add_argument(
          "--ips_unit", type=str, default=None, help="IPS unit"
      )
      parser.add_argument(
          "--model_name",
          type=str,
          default=0,
          help="training model_name, transformer_base",
      )
      parser.add_argument(
          "--mission_name",
          type=str,
          default=0,
          help="training mission name",
      )
      parser.add_argument(
          "--direction_id",
          type=int,
          default=0,
          help="training direction_id",
      )
      parser.add_argument(
          "--run_mode",
          type=str,
          default="sp",
          help="multi process or single process",
      )
      parser.add_argument(
          "--index",
          type=int,
          default=1,
          help="{1: speed, 2:mem, 3:profiler, 6:max_batch_size}",
      )
      parser.add_argument(
          "--gpu_num", type=int, default=1, help="nums of training gpus"
      )
      args = parser.parse_args()
      args.separator = (
          None if args.separator == "None" else args.separator
      )
      return args
  
file_path: PaddleOCR/benchmark/analysis.py
imports: from __future__ import print_function
  import argparse
  import json
  import os
  import re
  import traceback
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args