Skip to content

Commit

Permalink
issue #2406 added performance measurement for plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
bikegeek committed Jan 24, 2024
1 parent 2966bac commit 49d49f7
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@


import os
import time
from time import perf_counter
import logging
import yaml
import metcalcpy.util.read_env_vars_in_config as readconfig
# from metplotpy.plots import line as Line
from metplotpy.plots.line import line

def main():
Expand All @@ -21,12 +20,14 @@ def main():
logging.error(exc)

try:
start = perf_counter()
plot = line.Line(settings)
plot.save_to_file()
# plot.show_in_browser()
plot.write_html()
plot.write_output_file()
# plot.line_logger.info(f"Finished creating line plot: {datetime.now()}")
end = perf_counter()
execution_time = end - start
plot.line_logger.info(f"Finished creating line plot, execution time: {execution_time} seconds")
except ValueError as val_er:
print(val_er)

Expand Down

0 comments on commit 49d49f7

Please sign in to comment.