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

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

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years 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/perf_expectations/PRESUBMIT.py ('k') | tools/playback_benchmark/proxy_handler.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # 2 # Use of this source code is governed by a BSD-style license that can be
3 # Copyright 2010 Google Inc. All Rights Reserved. 3 # found in the LICENSE file.
4
5 """Playback driver.""" 4 """Playback driver."""
6 5
7 import cgi 6 import cgi
8 import simplejson as json 7 import simplejson as json
9 import os 8 import os
10 import string 9 import string
11 import sys 10 import sys
12 import threading 11 import threading
13 import urlparse 12 import urlparse
14 13
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 def _GetApplicationResource(self, handler): 186 def _GetApplicationResource(self, handler):
188 "Searches for response in cache. If not found, responds with 204." 187 "Searches for response in cache. If not found, responds with 204."
189 key = (handler.command, handler.path) 188 key = (handler.command, handler.path)
190 if key in self.cache: 189 if key in self.cache:
191 sys.stdout.write('%s %s -> found\n' % key) 190 sys.stdout.write('%s %s -> found\n' % key)
192 handler.wfile.write(self.cache[key]['response']) 191 handler.wfile.write(self.cache[key]['response'])
193 else: 192 else:
194 sys.stderr.write('%s %s -> not found\n' % key) 193 sys.stderr.write('%s %s -> not found\n' % key)
195 handler.send_response(204, "not in cache") 194 handler.send_response(204, "not in cache")
196 handler.end_headers() 195 handler.end_headers()
OLDNEW
« no previous file with comments | « tools/perf_expectations/PRESUBMIT.py ('k') | tools/playback_benchmark/proxy_handler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698