OLD | NEW |
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 """CPU, Memory, and FPS performance test for <video>. | 6 """CPU, Memory, and FPS performance test for <video>. |
7 | 7 |
8 Calculates decoded fps, dropped fps, CPU, and memory statistics while playing | 8 Calculates decoded fps, dropped fps, CPU, and memory statistics while playing |
9 HTML5 media element. The test compares results of playing a media file on | 9 HTML5 media element. The test compares results of playing a media file on |
10 different video resolutions. | 10 different video resolutions. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 dropped_frames = self.GetDOMValue('droppedFrames', tab_index=1) | 68 dropped_frames = self.GetDOMValue('droppedFrames', tab_index=1) |
69 dropped_fps = [ | 69 dropped_fps = [ |
70 float(value) for value in | 70 float(value) for value in |
71 self.GetDOMValue("droppedFPS.join(',')", tab_index=1).split(',')] | 71 self.GetDOMValue("droppedFPS.join(',')", tab_index=1).split(',')] |
72 | 72 |
73 pyauto_utils.PrintPerfResult('fps', file_name, decoded_fps, 'fps') | 73 pyauto_utils.PrintPerfResult('fps', file_name, decoded_fps, 'fps') |
74 pyauto_utils.PrintPerfResult('dropped_fps', file_name, dropped_fps, 'fps') | 74 pyauto_utils.PrintPerfResult('dropped_fps', file_name, dropped_fps, 'fps') |
75 pyauto_utils.PrintPerfResult('dropped_frames', file_name, dropped_frames, | 75 pyauto_utils.PrintPerfResult('dropped_frames', file_name, dropped_frames, |
76 'frames') | 76 'frames') |
77 | 77 |
78 self.GetBrowserWindow(0).GetTab(1).Close(True) | 78 self.CloseTab(tab_index=1) |
79 | 79 |
80 | 80 |
81 if __name__ == '__main__': | 81 if __name__ == '__main__': |
82 pyauto_media.Main() | 82 pyauto_media.Main() |
OLD | NEW |