Skip to content

Commit

Permalink
tweak memory reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
nsheff committed Aug 14, 2019
1 parent 84dcc97 commit 54e398c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pypiper/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,8 @@ def get_elapsed_time(self):
df['runtime'] = _pd.to_timedelta(df['runtime'])
except ValueError:
# return runtime estimate
# this happens if old profile style is mixed with the new one and the columns do not match
# this happens if old profile style is mixed with the new one
# and the columns do not match
return self.time_elapsed(self.starttime)
unique_df = df[~df.duplicated('cid', keep='last').values]
return sum(unique_df['runtime'].apply(lambda x: x.total_seconds()))
Expand Down Expand Up @@ -1718,9 +1719,9 @@ def stop_pipeline(self, status=COMPLETE_FLAG):
self.info("* " + "Total elapsed time (all runs)".rjust(30) + ": " +
str(datetime.timedelta(seconds=round(self.get_elapsed_time()))))
self.info("* " + "Peak memory (this run)".rjust(30) + ": " +
str(round(self.peak_memory, 2)) + " GB")
str(round(self.peak_memory, 4)) + " GB")
# self.info("* " + "Total peak memory (all runs)".rjust(30) + ": " +
# str(round(self.peak_memory, 2)) + " GB")
# str(round(self.peak_memory, 4)) + " GB")
if self.halted:
return

Expand Down

0 comments on commit 54e398c

Please sign in to comment.