Skip to content

Commit

Permalink
fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-devarajan authored Oct 3, 2024
1 parent 9f613c0 commit 868d806
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dfanalyzer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,12 @@ def _calculate_time(self):
grouped_df = self.events.groupby(["trange", "pid", "tid"]) \
.agg({"compute_time": sum, "io_time": sum, "app_io_time": sum}) \
.groupby(["trange"]).max()
# check if the max io_time > time_granularity
max_io_time = grouped_df.max().compute()['io_time']
if max_io_time > self.conf.time_granularity:
# throw a warning, running with large granuality
logging.warn(f"The max io_time {max_io_time} exceeds the time_granularity {self.conf.time_granularity}. " \
f"Please adjust the time_granularity to {int(2 * max_io_time /1e6)}e6 and rerun the analyzer.")
# check if the max io_time > time_granularity
max_io_time = grouped_df.max().compute()['io_time']
if max_io_time > self.conf.time_granularity:
# throw a warning, running with large granuality
logging.warn(f"The max io_time {max_io_time} exceeds the time_granularity {self.conf.time_granularity}. " \
f"Please adjust the time_granularity to {int(2 * max_io_time /1e6)}e6 and rerun the analyzer.")
grouped_df["io_time"] = grouped_df["io_time"].fillna(0)
grouped_df["compute_time"] = grouped_df["compute_time"].fillna(0)
grouped_df["app_io_time"] = grouped_df["app_io_time"].fillna(0)
Expand Down

0 comments on commit 868d806

Please sign in to comment.