Skip to content

Commit

Permalink
Merge pull request #11 from hcs-t4sg/holden/file_size
Browse files Browse the repository at this point in the history
holden/file size
  • Loading branch information
AC-Dap authored Oct 17, 2023
2 parents f44f22d + 912b4f5 commit 285c8e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ersilia/core/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ def track(self, input, result, meta):
time = datetime.now() - self.time_start
print("Time taken:", time)

input_dataframe = self.read_csv(input)
result_dataframe = self.read_csv(result)

input_size = input_dataframe.memory_usage(deep=True).sum() / 1024
output_size = result_dataframe.memory_usage(deep=True).sum() / 1024

input_avg_row_size = input_size / len(input_dataframe)
output_avg_row_size = output_size / len(result_dataframe)

print("Average Input Row Size (KB):", input_avg_row_size)
print("Average Output Row Size (KB):", output_avg_row_size)

def log_to_console(self, data):
print(f"\n{json.dumps(data)}\n")

Expand Down

0 comments on commit 285c8e0

Please sign in to comment.