diff options
author | Robert Brewer <fumanchu@aminus.org> | 2009-06-24 05:16:43 +0000 |
---|---|---|
committer | Robert Brewer <fumanchu@aminus.org> | 2009-06-24 05:16:43 +0000 |
commit | 6c68f4bab01ab90cfe59d888405ec1dd4b459bcc (patch) | |
tree | 8a1cc7548a5b35c1e848d4611c857fc335173e9d /cherrypy/test/benchmark.py | |
parent | 60831030792b4f018c627a06b2ef1b8fdad68644 (diff) | |
download | cherrypy-git-6c68f4bab01ab90cfe59d888405ec1dd4b459bcc.tar.gz |
Some cross ports from the python3 branch, including two test fixes.
Diffstat (limited to 'cherrypy/test/benchmark.py')
-rw-r--r-- | cherrypy/test/benchmark.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cherrypy/test/benchmark.py b/cherrypy/test/benchmark.py index 277bcb6d..93377020 100644 --- a/cherrypy/test/benchmark.py +++ b/cherrypy/test/benchmark.py @@ -217,7 +217,7 @@ Finished 1000 requests try: self.output = _cpmodpy.read_process(AB_PATH or "ab", self.args()) except: - print(_cperror.format_exc()) + print _cperror.format_exc() raise for attr, name, pattern in self.parse_patterns: @@ -246,7 +246,7 @@ def thread_report(path=SCRIPT_NAME + "/hello", concurrency=safe_threads): sess.run() row = [c] for attr in attrs: - val = getattr(sess, attr) + val = float(getattr(sess, attr)) avg[attr] += float(val) row.append(val) rows.append(row) @@ -377,7 +377,11 @@ if __name__ == '__main__': if "--null" in opts: print("\nUsing null Request object") try: - run_standard_benchmarks() + try: + run_standard_benchmarks() + except: + print _cperror.format_exc() + raise finally: cherrypy.engine.exit() |