aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/installed_allocators.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-03-09 19:34:31 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-03-09 19:34:31 +0100
commit3884a7712b74c09d4216b856464d6c3cdd9e3476 (patch)
tree1ccef133671bc885a46ea54edc39f983fc4ef298 /src/allocators/installed_allocators.py
parent8b416335805fc07262c0570bda324afccb5e3da3 (diff)
downloadallocbench-3884a7712b74c09d4216b856464d6c3cdd9e3476.tar.gz
allocbench-3884a7712b74c09d4216b856464d6c3cdd9e3476.zip
fmt all src/allocators using yapf
Diffstat (limited to 'src/allocators/installed_allocators.py')
-rw-r--r--src/allocators/installed_allocators.py30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/allocators/installed_allocators.py b/src/allocators/installed_allocators.py
index d45755a..5e3c78d 100644
--- a/src/allocators/installed_allocators.py
+++ b/src/allocators/installed_allocators.py
@@ -14,7 +14,6 @@
#
# You should have received a copy of the GNU General Public License
# along with allocbench.
-
"""Collect allocators using installed system libraries"""
import subprocess
@@ -22,23 +21,30 @@ import subprocess
# TODO: add more allocators
MAYBE_ALLOCATORS = ["tcmalloc", "jemalloc", "hoard"]
-allocators = {"libc": {"cmd_prefix": "",
- "binary_suffix": "",
- "LD_PRELOAD": "",
- "LD_LIBRARY_PATH": "",
- "color": "C1"}}
+allocators = {
+ "libc": {
+ "cmd_prefix": "",
+ "binary_suffix": "",
+ "LD_PRELOAD": "",
+ "LD_LIBRARY_PATH": "",
+ "color": "C1"
+ }
+}
for i, t in enumerate(MAYBE_ALLOCATORS):
try:
path = subprocess.run('whereis lib{} | cut -d":" -f2'.format(t),
- shell=True, stdout=subprocess.PIPE,
+ shell=True,
+ stdout=subprocess.PIPE,
universal_newlines=True).stdout.strip()
except:
continue
if path != "":
- allocators[t] = {"cmd_prefix": "",
- "binary_suffix": "",
- "LD_PRELOAD": path,
- "LD_LIBRARY_PATH": "",
- "color": "C"+str(i+2)}
+ allocators[t] = {
+ "cmd_prefix": "",
+ "binary_suffix": "",
+ "LD_PRELOAD": path,
+ "LD_LIBRARY_PATH": "",
+ "color": "C" + str(i + 2)
+ }