From 0825b2b53406bb4acf9d3857a1f846efa845877e Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 13 Jul 2020 17:17:20 +0200 Subject: [refactoring] fix or ignore many pylint hints * Add missing docstrings * Remove unused imports * fix line-to-long * fix some typos * ignore global-statement * ignore wrong-import-order for scripts under /scripts --- scripts/paper_plots.py | 9 ++++++++- scripts/print_facts.py | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/paper_plots.py b/scripts/paper_plots.py index 9d193bf..d34141d 100755 --- a/scripts/paper_plots.py +++ b/scripts/paper_plots.py @@ -27,12 +27,14 @@ currentdir = os.path.dirname(os.path.abspath(__file__)) parentdir = os.path.dirname(currentdir) sys.path.insert(0, parentdir) +# pylint: disable=wrong-import-position from allocbench.allocators.paper import allocators as paper_allocators from allocbench.benchmark import get_benchmark_object from allocbench.directories import get_current_result_dir, set_current_result_dir import allocbench.facter as facter import allocbench.plots as plt from allocbench.util import print_status, set_verbosity, print_license_and_exit +# pylint: enable=wrong-import-position logger = logging.getLogger(__file__) @@ -48,6 +50,7 @@ ALIGNED_ALLOCATORS = [ def falsesharing_plots(falsesharing): + """Create falsesharing tikz plots""" args = falsesharing.results["args"] falsesharing.results["allocators"] = { @@ -93,6 +96,7 @@ def falsesharing_plots(falsesharing): def blowup_plots(blowup): + """Create blowup bar plot including ideal rss""" args = blowup.results["args"] blowup.results["allocators"] = { k: v @@ -126,6 +130,7 @@ def blowup_plots(blowup): def loop_plots(loop): + """Create simple loop throughput tikz plot for 40 threads""" args = loop.results["args"] loop.results["allocators"] = { k: v @@ -143,8 +148,8 @@ def loop_plots(loop): def mysqld_plots(mysql): + """Create transactions and VmHWM tikz plots""" args = mysql.results["args"] - # mysql.results["allocators"] = {k: v for k, v in mysql.results["allocators"].items() if k in SURVEY_ALLOCATORS} plt.pgfplot(mysql, mysql.iterate_args(args), @@ -170,6 +175,7 @@ def mysqld_plots(mysql): def keydb_plots(keydb): + """Create throughput tikz bar plot""" args = keydb.results["args"] keydb.results["allocators"] = { k: v @@ -229,6 +235,7 @@ def summarize(benchmarks=None, exclude_benchmarks=None): def main(): + """Main entry point for WIP paper plot creation""" parser = argparse.ArgumentParser( description="Summarize allocbench results in allocator sets") parser.add_argument("results", help="path to results", type=str) diff --git a/scripts/print_facts.py b/scripts/print_facts.py index dfb07a6..4a057f7 100755 --- a/scripts/print_facts.py +++ b/scripts/print_facts.py @@ -26,12 +26,15 @@ CURRENTDIR = os.path.dirname(os.path.abspath(__file__)) PARENTDIR = os.path.dirname(CURRENTDIR) sys.path.insert(0, PARENTDIR) +# pylint: disable=wrong-import-position from allocbench.benchmark import AVAIL_BENCHMARKS, get_benchmark_object import allocbench.facter as facter from allocbench.plots import print_facts, print_common_facts +# pylint: enable=wrong-import-position def main(): + """Print facts about an allocbench benchmark results""" parser = argparse.ArgumentParser( description="Print facts about an allocbench result directory") parser.add_argument("results", help="path to allocbench results", type=str) -- cgit v1.2.3