Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 def MakeBenchmarkStats(rendering_stats_deltas): | |
|
nduca
2013/08/09 22:38:57
How about you make this be a class with fields.
ernstm
2013/08/09 23:37:32
Done.
| |
| 6 rs = rendering_stats_deltas | |
| 7 bs = {} | |
| 8 | |
| 9 # Scroll Stats | |
| 10 bs['total_time'] = rs.get('totalTimeInSeconds', 0) | |
| 11 bs['screen_frame_count'] = rs.get('numFramesSentToScreen', 0) | |
| 12 bs['dropped_frame_count'] = rs.get('droppedFrameCount', 0) | |
| 13 bs['impl_thread_scroll_count'] = rs.get('numImplThreadScrolls', 0) | |
| 14 bs['main_thread_scroll_count'] = rs.get('numMainThreadScrolls', 0) | |
| 15 bs['drawn_layers_count'] = rs.get('numLayersDrawn', 0) | |
| 16 bs['missing_tile_count'] = rs.get('numMissingTiles', 0) | |
| 17 | |
| 18 # Texture Upload Stats | |
| 19 bs['texture_upload_count'] = rs.get('textureUploadCount', 0) | |
| 20 bs['texture_upload_time'] = rs.get('totalTextureUploadTimeInSeconds', 0) | |
| 21 bs['commit_count'] = rs.get('totalCommitCount', 0) | |
| 22 bs['commit_time'] = rs.get('totalCommitTimeInSeconds', 0) | |
| 23 | |
| 24 # Image Decoding Stats | |
| 25 bs['deferred_image_decode_count'] = rs.get('totalDeferredImageDecodeCount', 0) | |
| 26 bs['deferred_image_decode_time'] = rs.get( | |
| 27 'totalDeferredImageDecodeTimeInSeconds', 0) | |
| 28 bs['deferred_image_cache_hits'] = rs.get('totalDeferredImageCacheHitCount', 0) | |
| 29 bs['image_gathering_count'] = rs.get('totalImageGatheringCount', 0) | |
| 30 bs['image_gathering_time'] = rs.get('totalImageGatheringTimeInSeconds', 0) | |
| 31 | |
| 32 # Tile Analysis Stats | |
| 33 bs['tile_analysis_count'] = rs.get('totalTilesAnalyzed', 0) | |
| 34 bs['tile_analysis_time'] = rs.get('totalTileAnalysisTimeInSeconds', 0) | |
| 35 bs['solid_color_tile_analysis_count'] = rs.get('solidColorTilesAnalyzed', 0) | |
| 36 | |
| 37 # Latency Stats | |
| 38 bs['input_event_count'] = rs.get('inputEventCount', 0) | |
| 39 bs['input_event_latency'] = rs.get('totalInputLatency', 0) | |
| 40 bs['touch_ui_count'] = rs.get('touchUICount', 0) | |
| 41 bs['touch_ui_latency'] = rs.get('totalTouchUILatency', 0) | |
| 42 bs['touch_acked_count'] = rs.get('touchAckedCount', 0) | |
| 43 bs['touch_acked_latency'] = rs.get('totalTouchAckedLatency', 0) | |
| 44 bs['scroll_update_count'] = rs.get('scrollUpdateCount', 0) | |
| 45 bs['scroll_update_latency'] = rs.get('totalScrollUpdateLatency', 0) | |
| 46 | |
| 47 return bs | |
| OLD | NEW |