Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Commit

Permalink
Move benchmark registation to before run_program
Browse files Browse the repository at this point in the history
  • Loading branch information
hSaria committed May 29, 2022
1 parent 67214bb commit 64be64f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chromaterm/__main__.py
Expand Up @@ -466,6 +466,12 @@ def main(args=None, max_wait=None, write_default=True):
import chromaterm.default_config
chromaterm.default_config.write_default_config(args.config)

config = Config(benchmark=args.benchmark)

# Print benchmark after cleanup in `run_program`
if args.benchmark:
atexit.register(config.print_benchmark_results)

if WINDOWS:
import chromaterm.platform.windows as platform
else:
Expand All @@ -480,12 +486,6 @@ def main(args=None, max_wait=None, write_default=True):
forward_fd = None
data_fd = platform.get_stdin()

config = Config(benchmark=args.benchmark)

# Print benchmark after cleanup in `run_program`
if args.benchmark:
atexit.register(config.print_benchmark_results)

# Signal handler to trigger reloading the config
def reload_config_handler(*_):
config_data = read_file(args.config)
Expand Down

0 comments on commit 64be64f

Please sign in to comment.