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

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

Issue 57373008: Remove tools/playback_benchmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """Tests playback.
7
8 Prerequisites:
9 1. OpenSSL library - http://www.openssl.org/
10 2. Python interface to the OpenSSL library - https://launchpad.net/pyopenssl
11
12 Example usage:
13 python run.py -t <test_dir>
14 """
15
16 from optparse import OptionParser
17 import sys
18
19 import playback_driver
20 import proxy_handler
21
22
23 def Run(options):
24 driver = playback_driver.PlaybackRequestHandler(options.test_dir)
25 httpd = proxy_handler.CreateServer(driver, options.port)
26 sa = httpd.socket.getsockname()
27 print "Serving HTTP on", sa[0], "port", sa[1], "..."
28 httpd.serve_forever()
29
30
31 def main():
32 parser = OptionParser()
33 parser.add_option("-t", "--test-dir", dest="test_dir",
34 help="directory containing recorded test data")
35 parser.add_option("-p", "--port", dest="port", type="int", default=8000)
36 options = parser.parse_args()[0]
37 if not options.test_dir:
38 raise Exception('please specify test directory')
39
40 Run(options)
41
42
43 if __name__ == '__main__':
44 sys.exit(main())
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