Skip to content

Commit

Permalink
Merge pull request #452 from ddps-lab/azure-collector
Browse files Browse the repository at this point in the history
upload code에 Region을 포함
  • Loading branch information
red0sena authored Oct 18, 2023
2 parents 78fa608 + ba2a005 commit 5bc0b64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ def collect_price_with_multithreading():

price_df = pd.DataFrame(price_list)
savings_df = preprocessing_price(price_df)
savings_df = savings_df.drop_duplicates(subset=['InstanceTier', 'InstanceType', 'Region'], keep='first')
savings_df = savings_df.drop_duplicates(subset=['InstanceTier', 'InstanceType', 'Region'], keep='first', inplace=True)

return savings_df
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def update_latest(data, timestamp):
# Save raw data in S3
def save_raw(data, timestamp):
data['Time'] = timestamp.strftime("%Y-%m-%d %H:%M:%S")
data = data[['Time','InstanceTier','InstanceType','OndemandPrice','SpotPrice', 'IF', 'Savings']]
data = data[['Time','InstanceTier','InstanceType', 'Region', 'OndemandPrice','SpotPrice', 'IF', 'Savings']]

data.to_csv(f"{AZURE_CONST.SERVER_SAVE_DIR}/{timestamp}.csv.gz", index=False, compression="gzip")

Expand Down

0 comments on commit 5bc0b64

Please sign in to comment.