aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/lldbbench.py
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2023-05-25 08:48:57 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2023-05-25 12:54:09 -0700
commit2238dcc39358353cac21df75c3c3286ab20b8f53 (patch)
tree1bb7ec8d7405ccd7fdb5a8a78d0cf5ef40bcc963 /lldb/packages/Python/lldbsuite/test/lldbbench.py
parentdaeee56798c51e8f007e8e8e6e677a420b14c9ef (diff)
downloadllvm-2238dcc39358353cac21df75c3c3286ab20b8f53.zip
llvm-2238dcc39358353cac21df75c3c3286ab20b8f53.tar.gz
llvm-2238dcc39358353cac21df75c3c3286ab20b8f53.tar.bz2
[NFC][Py Reformat] Reformat python files in lldb
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbbench.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbbench.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbbench.py b/lldb/packages/Python/lldbsuite/test/lldbbench.py
index 4771044..139f5f1 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbbench.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbbench.py
@@ -65,8 +65,7 @@ class Stopwatch(object):
if self.__start__ is None:
self.__start__ = time.time()
else:
- raise Exception(
- "start() already called, did you forget to stop() first?")
+ raise Exception("start() already called, did you forget to stop() first?")
# Return self to facilitate the context manager __enter__ protocol.
return self
@@ -96,8 +95,13 @@ class Stopwatch(object):
# return numpy.std(self.__nums__)
def __str__(self):
- return "Avg: %f (Laps: %d, Total Elapsed Time: %f, min=%f, max=%f)" % (self.avg(
- ), self.__laps__, self.__total_elapsed__, min(self.__nums__), max(self.__nums__))
+ return "Avg: %f (Laps: %d, Total Elapsed Time: %f, min=%f, max=%f)" % (
+ self.avg(),
+ self.__laps__,
+ self.__total_elapsed__,
+ min(self.__nums__),
+ max(self.__nums__),
+ )
class BenchBase(TestBase):