Beispiel #1
0
    run_config = run_configs.get()
    with run_config.start() as controller:
        info = controller.replay_info(run_config.replay_data(replay_path))
    print("-" * 60)
    print(info)


def main(argv):
    if not argv:
        raise ValueError("No replay directory or path specified.")
    if len(argv) > 2:
        raise ValueError("Too many arguments provided.")
    path = argv[1]

    try:
        if gfile.IsDirectory(path):
            return _replay_index(path)
        else:
            return _replay_info(path)
    except KeyboardInterrupt:
        pass


def entry_point():  # Needed so the setup.py scripts work.
    app.run(main)


if __name__ == "__main__":
    app.run(main)
Beispiel #2
0
def entry_point():  # Needed so the setup.py scripts work.
    app.run(main)
Beispiel #3
0
    run_config = run_configs.get()
    try:
        with open(FLAGS.hq_replay_set) as f:
            replay_list = json.load(f)
        replay_list = sorted([p for p, _ in replay_list])

        replay_queue = multiprocessing.JoinableQueue(FLAGS.n_instance * 10)
        replay_queue_thread = threading.Thread(target=replay_queue_filler,
                                               args=(replay_queue,
                                                     replay_list))
        replay_queue_thread.daemon = True
        replay_queue_thread.start()

        counter = multiprocessing.Value('i', 0)
        for i in range(FLAGS.n_instance):
            p = ReplayProcessor(run_config, replay_queue, counter,
                                len(replay_list))
            p.daemon = True
            p.start()
            time.sleep(
                1)  # Stagger startups, otherwise they seem to conflict somehow

        replay_queue.join()  # Wait for the queue to empty.
    except KeyboardInterrupt:
        print("Caught KeyboardInterrupt, exiting.")


if __name__ == '__main__':
    app.run()
Beispiel #4
0
 def main():
     app.run(lambda argv: unittest.main(argv=argv))
Beispiel #5
0
def entry_point():  # Needed so the setup.py scripts work.
  app.run(main)
Beispiel #6
0
  run_config = run_configs.get()
  with run_config.start() as controller:
    info = controller.replay_info(run_config.replay_data(replay_path))
  print("-" * 60)
  print(info)


def main(argv):
  if not argv:
    raise ValueError("No replay directory or path specified.")
  if len(argv) > 2:
    raise ValueError("Too many arguments provided.")
  path = argv[1]

  try:
    if gfile.IsDirectory(path):
      return _replay_index(path)
    else:
      return _replay_info(path)
  except KeyboardInterrupt:
    pass


def entry_point():  # Needed so the setup.py scripts work.
  app.run(main)


if __name__ == "__main__":
  app.run(main)
Beispiel #7
0
 def main():
   app.run(lambda argv: unittest.main(argv=argv))