Index: tools/perf/metrics/benchmark_stats.py |
diff --git a/tools/perf/metrics/benchmark_stats.py b/tools/perf/metrics/benchmark_stats.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fc990932736dc238c5f83d7815230d1300a34fa7 |
--- /dev/null |
+++ b/tools/perf/metrics/benchmark_stats.py |
@@ -0,0 +1,47 @@ |
+# Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+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.
|
+ rs = rendering_stats_deltas |
+ bs = {} |
+ |
+ # Scroll Stats |
+ bs['total_time'] = rs.get('totalTimeInSeconds', 0) |
+ bs['screen_frame_count'] = rs.get('numFramesSentToScreen', 0) |
+ bs['dropped_frame_count'] = rs.get('droppedFrameCount', 0) |
+ bs['impl_thread_scroll_count'] = rs.get('numImplThreadScrolls', 0) |
+ bs['main_thread_scroll_count'] = rs.get('numMainThreadScrolls', 0) |
+ bs['drawn_layers_count'] = rs.get('numLayersDrawn', 0) |
+ bs['missing_tile_count'] = rs.get('numMissingTiles', 0) |
+ |
+ # Texture Upload Stats |
+ bs['texture_upload_count'] = rs.get('textureUploadCount', 0) |
+ bs['texture_upload_time'] = rs.get('totalTextureUploadTimeInSeconds', 0) |
+ bs['commit_count'] = rs.get('totalCommitCount', 0) |
+ bs['commit_time'] = rs.get('totalCommitTimeInSeconds', 0) |
+ |
+ # Image Decoding Stats |
+ bs['deferred_image_decode_count'] = rs.get('totalDeferredImageDecodeCount', 0) |
+ bs['deferred_image_decode_time'] = rs.get( |
+ 'totalDeferredImageDecodeTimeInSeconds', 0) |
+ bs['deferred_image_cache_hits'] = rs.get('totalDeferredImageCacheHitCount', 0) |
+ bs['image_gathering_count'] = rs.get('totalImageGatheringCount', 0) |
+ bs['image_gathering_time'] = rs.get('totalImageGatheringTimeInSeconds', 0) |
+ |
+ # Tile Analysis Stats |
+ bs['tile_analysis_count'] = rs.get('totalTilesAnalyzed', 0) |
+ bs['tile_analysis_time'] = rs.get('totalTileAnalysisTimeInSeconds', 0) |
+ bs['solid_color_tile_analysis_count'] = rs.get('solidColorTilesAnalyzed', 0) |
+ |
+ # Latency Stats |
+ bs['input_event_count'] = rs.get('inputEventCount', 0) |
+ bs['input_event_latency'] = rs.get('totalInputLatency', 0) |
+ bs['touch_ui_count'] = rs.get('touchUICount', 0) |
+ bs['touch_ui_latency'] = rs.get('totalTouchUILatency', 0) |
+ bs['touch_acked_count'] = rs.get('touchAckedCount', 0) |
+ bs['touch_acked_latency'] = rs.get('totalTouchAckedLatency', 0) |
+ bs['scroll_update_count'] = rs.get('scrollUpdateCount', 0) |
+ bs['scroll_update_latency'] = rs.get('totalScrollUpdateLatency', 0) |
+ |
+ return bs |