def main():
  utils.tweak_logging()  # Interpret -v and -q flags.
  n = 10000
  for arg in sys.argv[1:]:
    try:
      n = int(arg)
      break
    except Exception:
      pass
  prof = cProfile.Profile()
  prof = prof.runctx('bench(%d)' + n, globals(), locals())
  stats = pstats.Stats(prof)
  stats.strip_dirs()
  stats.sort_stats('time')  # 'time', 'cumulative' or 'calls'
  stats.print_stats(20)  # Arg: how many to print (optional)
  # Uncomment (and tweak) the following calls for more details.
  # stats.print_callees(10)
  # stats.print_callers(10)
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/tests/keybench.py/main/operator `%` -> `+`