diff options
author | BonfaceKilz | 2021-04-30 12:45:59 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-04-30 13:45:15 +0300 |
commit | 03b6bcee689c1910bd850c6109cc37adc509cf5a (patch) | |
tree | 2ca686d7f1b6649bfbd593607aa406eff8efbfb7 /wqflask/utility/benchmark.py | |
parent | 6be1111fd76a2c47de7a20cc18bb9f4d8d2d4ffa (diff) | |
download | genenetwork2-03b6bcee689c1910bd850c6109cc37adc509cf5a.tar.gz |
autopep8: Fix E501
Diffstat (limited to 'wqflask/utility/benchmark.py')
-rw-r--r-- | wqflask/utility/benchmark.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wqflask/utility/benchmark.py b/wqflask/utility/benchmark.py index 48ab1dc0..6ece2f21 100644 --- a/wqflask/utility/benchmark.py +++ b/wqflask/utility/benchmark.py @@ -19,7 +19,8 @@ class Bench: if self.name: logger.debug("Starting benchmark: %s" % (self.name)) else: - logger.debug("Starting benchmark at: %s [%i]" % (inspect.stack()[1][3], inspect.stack()[1][2])) + logger.debug("Starting benchmark at: %s [%i]" % ( + inspect.stack()[1][3], inspect.stack()[1][2])) self.start_time = time.time() def __exit__(self, type, value, traceback): @@ -33,11 +34,13 @@ class Bench: logger.info(" %s took: %f seconds" % (name, (time_taken))) if self.name: - Bench.entries[self.name] = Bench.entries.get(self.name, 0) + time_taken + Bench.entries[self.name] = Bench.entries.get( + self.name, 0) + time_taken @classmethod def report(cls): - total_time = sum((time_taken for time_taken in list(cls.entries.values()))) + total_time = sum( + (time_taken for time_taken in list(cls.entries.values()))) print("\nTiming report\n") for name, time_taken in list(cls.entries.items()): percent = int(round((time_taken / total_time) * 100)) |