diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-05-06 16:56:32 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-06-02 11:18:47 +0200 |
| commit | 8174a918ea3b7cb216bf7ea98cfdc10661b5c37d (patch) | |
| tree | 0747ec3ccb9f8d7eeccfac35977fc17855ca3bbb /scripts/print_facts.py | |
| parent | 8f52e8fc02dd235582f5961941bcd564e9a681cd (diff) | |
| download | allocbench-8174a918ea3b7cb216bf7ea98cfdc10661b5c37d.tar.gz allocbench-8174a918ea3b7cb216bf7ea98cfdc10661b5c37d.zip | |
make the whole project more python idiomatic
* rename src directory to allocbench
* make global variable names UPPERCASE
* format a lot of code using yapf
* use lowercase ld_preload and ld_library_path as Allocator members
* name expected Errors 'err' and don't raise a new Exception
* disable some pylint messages
Diffstat (limited to 'scripts/print_facts.py')
| -rwxr-xr-x | scripts/print_facts.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/print_facts.py b/scripts/print_facts.py index 831cc78..389028e 100755 --- a/scripts/print_facts.py +++ b/scripts/print_facts.py @@ -29,9 +29,10 @@ CURRENTDIR = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentfram PARENTDIR = os.path.dirname(CURRENTDIR) sys.path.insert(0, PARENTDIR) -import src.facter -from src.plots import print_facts, print_common_facts -from src.util import print_error +import allocbench.facter as facter +from allocbench.globalvars import BENCHMARKS +from allocbench.plots import print_facts, print_common_facts +from allocbench.util import print_error def main(): @@ -40,15 +41,15 @@ def main(): args = parser.parse_args() # Load common facts - src.facter.load_facts(args.results) + facter.load_facts(args.results) print_common_facts() cwd = os.getcwd() os.chdir(args.results) - for benchmark in src.globalvars.benchmarks: - bench_module = importlib.import_module(f"src.benchmarks.{benchmark}") + for benchmark in BENCHMARKS: + bench_module = importlib.import_module(f"allocbench.benchmarks.{benchmark}") if not hasattr(bench_module, benchmark): print_error(f"{benchmark} has no member {benchmark}") |
