Skip to content

Commit

Permalink
use names of each of the piped cmds not just the 1st one in profile; #…
Browse files Browse the repository at this point in the history
  • Loading branch information
stolarczyk committed May 8, 2019
1 parent 5a6c627 commit a1fdec1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pypiper/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,10 +892,8 @@ def make_dict(command):
else:
param_list[i]["stdin"] = processes[i - 1].stdout
processes.append(psutil.Popen(preexec_fn=os.setpgrp, **param_list[i]))

self.procs[processes[-1].pid] = {
"proc_name": proc_name,
"subproc_name" : get_proc_name(param_list[i]["args"]),
"proc_name": get_proc_name(param_list[i]["args"]),
"start_time": start_time,
"container": container,
"p": processes[-1]
Expand Down Expand Up @@ -1674,7 +1672,7 @@ def _terminate_running_subprocesses(self):
elapsed_time = time.time() - self.procs[pid]["start_time"]
process_peak_mem = self._memory_usage(pid, container=proc_dict["container"])/1e6
self._report_profile(self.procs[pid]["proc_name"], None, elapsed_time, process_peak_mem)
self._kill_child_process(pid, proc_dict["subproc_name"])
self._kill_child_process(pid, proc_dict["proc_name"])
del self.procs[pid]


Expand Down

0 comments on commit a1fdec1

Please sign in to comment.