diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-02-10 19:30:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-10 19:30:15 +0100 |
commit | 595ec422d6f9bd32f42c356d2f316ec69e0f7bee (patch) | |
tree | 766a12ddd91b43e09f670f913a4069bc7dc82d57 /tests/benchmark | |
parent | e3d5deca2886d9e2d5f2be2a252e39e02ae42b96 (diff) | |
download | pylint-git-595ec422d6f9bd32f42c356d2f316ec69e0f7bee.tar.gz |
Update ``pydocstringformatter`` to 0.4.0 (#5787)
Diffstat (limited to 'tests/benchmark')
-rw-r--r-- | tests/benchmark/test_baseline_benchmarks.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/benchmark/test_baseline_benchmarks.py b/tests/benchmark/test_baseline_benchmarks.py index 5227ca5ae..4865a3bd5 100644 --- a/tests/benchmark/test_baseline_benchmarks.py +++ b/tests/benchmark/test_baseline_benchmarks.py @@ -1,4 +1,4 @@ -""" Profiles basic -jX functionality """ +"""Profiles basic -jX functionality.""" # Copyright (c) 2020-2021 Pierre Sassoulas <pierre.sassoulas@gmail.com> # Copyright (c) 2020 hippo91 <guillaume.peillex@gmail.com> # Copyright (c) 2020 Claudiu Popa <pcmanticore@gmail.com> @@ -37,7 +37,7 @@ def _empty_filepath(): class SleepingChecker(BaseChecker): - """A checker that sleeps, the wall-clock time should reduce as we add workers + """A checker that sleeps, the wall-clock time should reduce as we add workers. As we apply a roughly constant amount of "work" in this checker any variance is likely to be caused by the pylint system. @@ -56,7 +56,7 @@ class SleepingChecker(BaseChecker): sleep_duration = 0.5 # the time to pretend we're doing work for def process_module(self, _node: nodes.Module) -> None: - """Sleeps for `sleep_duration` on each call + """Sleeps for `sleep_duration` on each call. This effectively means each file costs ~`sleep_duration`+framework overhead """ @@ -64,7 +64,7 @@ class SleepingChecker(BaseChecker): class SleepingCheckerLong(BaseChecker): - """A checker that sleeps, the wall-clock time should reduce as we add workers + """A checker that sleeps, the wall-clock time should reduce as we add workers. As we apply a roughly constant amount of "work" in this checker any variance is likely to be caused by the pylint system. @@ -83,7 +83,7 @@ class SleepingCheckerLong(BaseChecker): sleep_duration = 0.5 # the time to pretend we're doing work for def process_module(self, _node: nodes.Module) -> None: - """Sleeps for `sleep_duration` on each call + """Sleeps for `sleep_duration` on each call. This effectively means each file costs ~`sleep_duration`+framework overhead """ @@ -91,7 +91,7 @@ class SleepingCheckerLong(BaseChecker): class NoWorkChecker(BaseChecker): - """A checker that sleeps, the wall-clock time should change as we add threads""" + """A checker that sleeps, the wall-clock time should change as we add threads.""" __implements__ = (pylint.interfaces.IRawChecker,) @@ -112,7 +112,7 @@ class NoWorkChecker(BaseChecker): group="baseline", ) class TestEstablishBaselineBenchmarks: - """Naive benchmarks for the high-level pylint framework + """Naive benchmarks for the high-level pylint framework. Because this benchmarks the fundamental and common parts and changes seen here will impact everything else @@ -127,7 +127,7 @@ class TestEstablishBaselineBenchmarks: lot_of_files = 500 def test_baseline_benchmark_j1(self, benchmark): - """Establish a baseline of pylint performance with no work + """Establish a baseline of pylint performance with no work. We will add extra Checkers in other benchmarks. @@ -143,7 +143,7 @@ class TestEstablishBaselineBenchmarks: ), f"Expected no errors to be thrown: {pprint.pformat(linter.reporter.messages)}" def test_baseline_benchmark_j10(self, benchmark): - """Establish a baseline of pylint performance with no work across threads + """Establish a baseline of pylint performance with no work across threads. Same as `test_baseline_benchmark_j1` but we use -j10 with 10 fake files to ensure end-to-end-system invoked. @@ -165,7 +165,7 @@ class TestEstablishBaselineBenchmarks: ), f"Expected no errors to be thrown: {pprint.pformat(linter.reporter.messages)}" def test_baseline_benchmark_check_parallel_j10(self, benchmark): - """Should demonstrate times very close to `test_baseline_benchmark_j10`""" + """Should demonstrate times very close to `test_baseline_benchmark_j10`.""" linter = PyLinter(reporter=Reporter()) # Create file per worker, using all workers @@ -178,7 +178,7 @@ class TestEstablishBaselineBenchmarks: ), f"Expected no errors to be thrown: {pprint.pformat(linter.reporter.messages)}" def test_baseline_lots_of_files_j1(self, benchmark): - """Establish a baseline with only 'master' checker being run in -j1 + """Establish a baseline with only 'master' checker being run in -j1. We do not register any checkers except the default 'master', so the cost is just that of the system with a lot of files registered @@ -197,7 +197,7 @@ class TestEstablishBaselineBenchmarks: ), f"Expected no errors to be thrown: {pprint.pformat(linter.reporter.messages)}" def test_baseline_lots_of_files_j10(self, benchmark): - """Establish a baseline with only 'master' checker being run in -j10 + """Establish a baseline with only 'master' checker being run in -j10. As with the -j1 variant above `test_baseline_lots_of_files_j1`, we do not register any checkers except the default 'master', so the cost is just that of @@ -217,7 +217,7 @@ class TestEstablishBaselineBenchmarks: ), f"Expected no errors to be thrown: {pprint.pformat(linter.reporter.messages)}" def test_baseline_lots_of_files_j1_empty_checker(self, benchmark): - """Baselines pylint for a single extra checker being run in -j1, for N-files + """Baselines pylint for a single extra checker being run in -j1, for N-files. We use a checker that does no work, so the cost is just that of the system at scale @@ -237,7 +237,7 @@ class TestEstablishBaselineBenchmarks: ), f"Expected no errors to be thrown: {pprint.pformat(linter.reporter.messages)}" def test_baseline_lots_of_files_j10_empty_checker(self, benchmark): - """Baselines pylint for a single extra checker being run in -j10, for N-files + """Baselines pylint for a single extra checker being run in -j10, for N-files. We use a checker that does no work, so the cost is just that of the system at scale, across workers @@ -257,7 +257,7 @@ class TestEstablishBaselineBenchmarks: ), f"Expected no errors to be thrown: {pprint.pformat(linter.reporter.messages)}" def test_baseline_benchmark_j1_single_working_checker(self, benchmark): - """Establish a baseline of single-worker performance for PyLinter + """Establish a baseline of single-worker performance for PyLinter. Here we mimic a single Checker that does some work so that we can see the impact of running a simple system with -j1 against the same system with -j10. @@ -283,7 +283,7 @@ class TestEstablishBaselineBenchmarks: ), f"Expected no errors to be thrown: {pprint.pformat(linter.reporter.messages)}" def test_baseline_benchmark_j10_single_working_checker(self, benchmark): - """Establishes baseline of multi-worker performance for PyLinter/check_parallel + """Establishes baseline of multi-worker performance for PyLinter/check_parallel. We expect this benchmark to take less time that test_baseline_benchmark_j1, `error_margin*(1/J)*(numfiles*SleepingChecker.sleep_duration)` @@ -310,7 +310,7 @@ class TestEstablishBaselineBenchmarks: ), f"Expected no errors to be thrown: {pprint.pformat(linter.reporter.messages)}" def test_baseline_benchmark_j1_all_checks_single_file(self, benchmark): - """Runs a single file, with -j1, against all plug-ins + """Runs a single file, with -j1, against all plug-ins. ... that's the intent at least. """ @@ -327,7 +327,7 @@ class TestEstablishBaselineBenchmarks: ), f"Expected no errors to be thrown: {pprint.pformat(runner.linter.reporter.messages)}" def test_baseline_benchmark_j1_all_checks_lots_of_files(self, benchmark): - """Runs lots of files, with -j1, against all plug-ins + """Runs lots of files, with -j1, against all plug-ins. ... that's the intent at least. """ |