diff options
author | Joshua Bakita <jbakita@cs.unc.edu> | 2021-03-07 23:15:50 -0500 |
---|---|---|
committer | Joshua Bakita <jbakita@cs.unc.edu> | 2021-03-07 23:15:50 -0500 |
commit | 37a30c808c659d285bdaed6fc28c89a4d5db1cb4 (patch) | |
tree | 987a0ff22f71e611a8a32ef39baec24619b5acd8 | |
parent | 899765845196007c695a2f858dbe3a41b8db4a2b (diff) |
Slightly increase the efficiency of the case study script
-rwxr-xr-x | run_case_study.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/run_case_study.py b/run_case_study.py index b073468..86c6775 100755 --- a/run_case_study.py +++ b/run_case_study.py | |||
@@ -36,12 +36,12 @@ def ID2PID(lookupID): | |||
36 | res = None | 36 | res = None |
37 | # Find benchmark PID (avoid getting shell or numactl PID) | 37 | # Find benchmark PID (avoid getting shell or numactl PID) |
38 | try: | 38 | try: |
39 | res = subprocess.check_output("pgrep -af ' " + lookupID + " ' | grep -v numactl | cut -d ' ' -f 1", shell=True) | 39 | res = subprocess.check_output("pgrep -af ' " + lookupID + " ' | grep -v numactl", shell=True) |
40 | except: | 40 | except: |
41 | res = None | 41 | res = None |
42 | if res: | 42 | if res: |
43 | # Ignore the newline | 43 | # Ignore the newline |
44 | return res.decode("utf-8").strip() | 44 | return res.decode("utf-8").split(" ")[0].strip() |
45 | else: | 45 | else: |
46 | return None | 46 | return None |
47 | 47 | ||