Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: tools/playback_benchmark/run.py

Issue 1515006: Playback benchmark scripts. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/playback_benchmark/proxy_handler.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2010 Google Inc. All Rights Reserved.
4
5 """Script for test playback.
6
7 Prerequisites:
8 1. OpenSSL library - http://www.openssl.org/
9 2. Python interface to the OpenSSL library - https://launchpad.net/pyopenssl
10
11 Example usage:
12 python run.py -t <test_dir>
13 """
14
15 from optparse import OptionParser
16
17 import playback_driver
18 import proxy_handler
19
20
21 def Run(options):
22 driver = playback_driver.PlaybackRequestHandler(options.test_dir)
23 httpd = proxy_handler.CreateServer(driver, options.port)
24 sa = httpd.socket.getsockname()
25 print "Serving HTTP on", sa[0], "port", sa[1], "..."
26 httpd.serve_forever()
27
28
29 if __name__ == '__main__':
30 parser = OptionParser()
31 parser.add_option("-t", "--test-dir", dest="test_dir",
32 help="directory containing recorded test data")
33 parser.add_option("-p", "--port", dest="port", type="int", default=8000)
34 options = parser.parse_args()[0]
35 if not options.test_dir:
36 raise Exception('please specify test directory')
37
38 Run(options)
39
OLDNEW
« no previous file with comments | « tools/playback_benchmark/proxy_handler.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698