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

Side by Side Diff: tools/telemetry/telemetry/core/platform/profiler/monsoon_profiler.py

Issue 23458037: Profiler.is_supported takes browser_type instead of options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix loading_profile.py Created 7 years, 3 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import csv 5 import csv
6 import multiprocessing 6 import multiprocessing
7 import os 7 import os
8 import sys 8 import sys
9 9
10 from telemetry.core import exceptions 10 from telemetry.core import exceptions
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 self._collector.start() 72 self._collector.start()
73 if not self._is_collecting.wait(timeout=0.5): 73 if not self._is_collecting.wait(timeout=0.5):
74 self._collector.terminate() 74 self._collector.terminate()
75 raise exceptions.ProfilingException('Failed to start data collection.') 75 raise exceptions.ProfilingException('Failed to start data collection.')
76 76
77 @classmethod 77 @classmethod
78 def name(cls): 78 def name(cls):
79 return 'monsoon' 79 return 'monsoon'
80 80
81 @classmethod 81 @classmethod
82 def is_supported(cls, options): 82 def is_supported(cls, browser_type):
83 if not monsoon: 83 if not monsoon:
84 return False 84 return False
85 try: 85 try:
86 monsoon.Monsoon(wait=False) 86 monsoon.Monsoon(wait=False)
87 except IOError: 87 except IOError:
88 return False 88 return False
89 else: 89 else:
90 return True 90 return True
91 91
92 def CollectProfile(self): 92 def CollectProfile(self):
93 self._is_collecting.clear() 93 self._is_collecting.clear()
94 self._collector.join() 94 self._collector.join()
95 return [self._output_path] 95 return [self._output_path]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698