summaryrefslogtreecommitdiff
path: root/tools/util_test.py
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-10-15 16:44:35 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-10-16 09:37:38 -0400
commitc61a0f2f84e619a70704b59fd72cd7da863d4461 (patch)
tree275323c80a4791b311073150f1df8d98d3a8df1b /tools/util_test.py
parent62962e71fe244a4b0992185f2ba900ba3fd5005e (diff)
First pass at http benchmark.
Diffstat (limited to 'tools/util_test.py')
-rw-r--r--tools/util_test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/util_test.py b/tools/util_test.py
index 4adf0d658..24fd2eba1 100644
--- a/tools/util_test.py
+++ b/tools/util_test.py
@@ -78,11 +78,19 @@ def parse_unit_test_output_test():
assert expected == None
+def parse_wrk_output_test():
+ print "Testing util.parse_wrk_output_test()..."
+ f = open(os.path.join(util.root_path, "tools/testdata/wrk1.txt"))
+ req_per_sec = util.parse_wrk_output(f.read())
+ assert req_per_sec == 1837
+
+
def util_test():
pattern_match_test()
parse_exit_code_test()
shell_quote_win_test()
parse_unit_test_output_test()
+ parse_wrk_output_test()
if __name__ == '__main__':