Skip to content

Commit

Permalink
write time in EST regardless of server
Browse files Browse the repository at this point in the history
  • Loading branch information
wh3248 committed Jan 3, 2025
1 parent 1db2112 commit 36d5629
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/run-performance-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ on:
required: false
default: "1997"
schedule:
# Run at 5am on Monday and Friday
- cron: '0 5 * * 1'
- cron: '0 5 * * 5'
# Run at 4am on Monday and Saturday
# Jenkins job runs 5am those days to download results
- cron: '0 4 * * 1'
- cron: '0 4 * * 6'

jobs:
runscript:
Expand Down
5 changes: 4 additions & 1 deletion performance/test_1pt_1wy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import importlib
import datetime
import time
import pytz
import socket
import hf_hydrodata as hf

Expand Down Expand Up @@ -86,7 +87,9 @@ def write_log(scenario_name, request, local_remote, duration):
hostname = socket.gethostname()
log_directory = "./artifacts"
os.makedirs(log_directory, exist_ok=True)
cur_date = datetime.datetime.now().strftime("%Y-%m-%d:%H:%M:%S")
est = pytz.timezone('US/Eastern')
current_time_est = datetime.datetime.now(est)
cur_date = current_time_est.strftime("%Y-%m-%d:%H:%M:%S")
line = f"{cur_date},{scenario_name},{hf_hydrodata_version},{hydrodata_url},{subsettools_version},{local_remote},{hostname},{cpus},{cache_state},{wy},{comment},{duration}\n"
log_file = f"{log_directory}/log_artifact.csv"
with open(log_file, "a+") as stream:
Expand Down

0 comments on commit 36d5629

Please sign in to comment.