Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include copy time on plotman analyze #704

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update: Calculate total in the end of log file
ReaktorDTR committed May 30, 2021
commit 056bed21d2b21451f6375d7f8aec8083507e1ea5
6 changes: 6 additions & 0 deletions src/plotman/analyzer.py
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ def analyze(logfilenames, clipterminals, bytmp, bybitfield):
n_uniform = 0
is_first_last = False
total_time = 0
copy_time = 0

# Read the logfile, triggering various behaviors on various
# regex matches.
@@ -96,6 +97,11 @@ def analyze(logfilenames, clipterminals, bytmp, bybitfield):
m = re.search(r'^Copy time = (\d+.\d+) seconds.*', line)
if m:
copy_time = float(m.group(1))

# Rename plot. Sample log line:
# Renamed final file from "/mnt/d1/a4.plot.2.tmp" to "/mnt/d2/a4.plot"
m = re.search(r'^Renamed final file.*', line)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this present regardless of what combinations of tmp/tmp2/dst are specified?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and if tmp same as dst it will show 0 sec because of simple renaming.

if m:
data.setdefault(sl, {}).setdefault('copy time', []).append(copy_time)
data.setdefault(sl, {}).setdefault('total time', []).append(total_time + copy_time)
for phase in ['1', '2', '3', '4']: