gcpy.benchmark.modules.benchmark_gcclassic_stats

Script to scrape statistics from a 1-month GEOS-Chem Classic benchmark run, which can then be placed in the “GEOS-Chem 1-month Benchmark Stats” Google spreadsheet.

Examples

$ conda activate gcpy_env
$ python -m gcpy.benchmark.modules.benchmark_scrape_gcclassic_stats \
  14.5.0-alpha.5 \
  14.5.0-alpha.6

Functions

format_timer(timer)

Strips spaces and preceding "=>" characters from a GEOS-Chem Classic timer name

get_text_from_web(url)

Returns the text from a file located on the web.

main(ref_label, dev_label)

Main program.

parse_timer(timer)

Extracts the timer name and time in seconds from the given text.

print_stats(stats)

Prints OH metrics and timing statistics.

scrape_stats(text)

Extracts timing statistics and OH metrics from the given text.

gcpy.benchmark.modules.benchmark_gcclassic_stats.print_stats(stats)[source]

Prints OH metrics and timing statistics.

Parameters:

stats (dict) – Dictionary with statistics to print.

gcpy.benchmark.modules.benchmark_gcclassic_stats.format_timer(timer)[source]

Strips spaces and preceding “=>” characters from a GEOS-Chem Classic timer name

gcpy.benchmark.modules.benchmark_gcclassic_stats.parse_timer(timer)[source]

Extracts the timer name and time in seconds from the given text.

Parameters:

timer (str) – Line of text with GEOS-Chem Classic timing output.

gcpy.benchmark.modules.benchmark_gcclassic_stats.scrape_stats(text)[source]

Extracts timing statistics and OH metrics from the given text.

Parameters:

text (str) – Text scraped from the log file and metrics file.

gcpy.benchmark.modules.benchmark_gcclassic_stats.get_text_from_web(url)[source]

Returns the text from a file located on the web.

Parameters:

url (str) – URL of the file to be parsed.

gcpy.benchmark.modules.benchmark_gcclassic_stats.main(ref_label, dev_label)[source]

Main program. Given the labels from two benchmark simulations (ref and dev), downloads the relevant files from AWS and passes the text to function “scrape_info” where it will be analyzed.

Parameters:
  • ref_label (str) – Label for the Ref version.

  • dev_label (str) – Label for the Dev version.