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

Side by Side Diff: chrome/test/functional/perf_endure.py

Issue 9309019: Add argument use_poll=True to asyncore.loop() calls in perf_snapshot.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | « no previous file | chrome/test/pyautolib/perf_snapshot.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 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Performance tests for Chrome Endure (long-running perf tests on Chrome). 6 """Performance tests for Chrome Endure (long-running perf tests on Chrome).
7 """ 7 """
8 8
9 import logging 9 import logging
10 import os 10 import os
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 """ 66 """
67 info = self.GetProcessInfo() 67 info = self.GetProcessInfo()
68 tab_proc_info = [] 68 tab_proc_info = []
69 for browser_info in info['browsers']: 69 for browser_info in info['browsers']:
70 for proc_info in browser_info['processes']: 70 for proc_info in browser_info['processes']:
71 if (proc_info['child_process_type'] == 'Tab' and 71 if (proc_info['child_process_type'] == 'Tab' and
72 [x for x in proc_info['titles'] if tab_title_substring in x]): 72 [x for x in proc_info['titles'] if tab_title_substring in x]):
73 tab_proc_info.append(proc_info) 73 tab_proc_info.append(proc_info)
74 self.assertEqual(len(tab_proc_info), 1, 74 self.assertEqual(len(tab_proc_info), 1,
75 msg='Expected to find 1 %s tab process, but found %d ' 75 msg='Expected to find 1 %s tab process, but found %d '
76 'instead.' % (tab_title_substring, len(tab_proc_info))) 76 'instead.\nCurrent process info:\n%s.' % (
77 tab_title_substring, len(tab_proc_info),
78 self.pformat(info)))
77 tab_proc_info = tab_proc_info[0] 79 tab_proc_info = tab_proc_info[0]
78 return { 80 return {
79 'private_mem': tab_proc_info['working_set_mem']['priv'] 81 'private_mem': tab_proc_info['working_set_mem']['priv']
80 } 82 }
81 83
82 def _GetPerformanceStats(self, webapp_name, tab_title_substring): 84 def _GetPerformanceStats(self, webapp_name, tab_title_substring):
83 """Gets performance statistics and outputs the results. 85 """Gets performance statistics and outputs the results.
84 86
85 Args: 87 Args:
86 webapp_name: A string name for the webapp being tested. Should not 88 webapp_name: A string name for the webapp being tested. Should not
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 if not self._WaitForElementByXpath( 438 if not self._WaitForElementByXpath(
437 driver, wait, '//div[text()="Acquaintances"]'): 439 driver, wait, '//div[text()="Acquaintances"]'):
438 num_errors += 1 440 num_errors += 1
439 time.sleep(1) 441 time.sleep(1)
440 442
441 self._GetPerformanceStats(self._webapp_name, self._tab_title_substring) 443 self._GetPerformanceStats(self._webapp_name, self._tab_title_substring)
442 444
443 445
444 if __name__ == '__main__': 446 if __name__ == '__main__':
445 pyauto_functional.Main() 447 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « no previous file | chrome/test/pyautolib/perf_snapshot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698