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

Unified Diff: tools/perf/perf_tools/smoothness_benchmark.py

Issue 11575015: adding render stats for deferred image decoding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/tile_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/perf_tools/smoothness_benchmark.py
diff --git a/tools/perf/perf_tools/smoothness_benchmark.py b/tools/perf/perf_tools/smoothness_benchmark.py
old mode 100644
new mode 100755
index 96d393cdf2c30fa1c4957917c24869c3e6d83d31..b2e8ab572ea1fce3476a8375b1132338a8c819fe
--- a/tools/perf/perf_tools/smoothness_benchmark.py
+++ b/tools/perf/perf_tools/smoothness_benchmark.py
@@ -112,6 +112,33 @@ def CalcFirstPaintTimeResults(results, tab):
results.Add('first_paint', 'ms', round(first_paint_secs * 1000, 1))
+def CalcImageDecodingResults(rendering_stats_deltas, results):
+ totalDeferredImageDecodeCount = rendering_stats_deltas.get(
+ 'totalDeferredImageDecodeCount', 0)
+ totalDeferredImageCacheHitCount = rendering_stats_deltas.get(
+ 'totalDeferredImageCacheHitCount', 0)
+ totalImageGatheringCount = rendering_stats_deltas.get(
+ 'totalImageGatheringCount', 0)
+ totalDeferredImageDecodeTimeInSeconds = rendering_stats_deltas.get(
+ 'totalDeferredImageDecodeTimeInSeconds', 0)
+ totalImageGatheringTimeInSeconds = rendering_stats_deltas.get(
+ 'totalImageGatheringTimeInSeconds', 0)
+
+ averageImageGatheringTime = DivideIfPossibleOrZero(
+ (totalImageGatheringTimeInSeconds * 1000), totalImageGatheringCount)
+
+ results.Add('total_deferred_image_decode_count', 'count',
+ totalDeferredImageDecodeCount,
+ data_type='unimportant')
+ results.Add('total_image_cache_hit_count', 'count',
+ totalDeferredImageCacheHitCount,
+ data_type='unimportant')
+ results.Add('average_image_gathering_time', 'ms', averageImageGatheringTime,
+ data_type='unimportant')
+ results.Add('total_deferred_image_decoding_time', 'seconds',
+ totalDeferredImageDecodeTimeInSeconds,
+ data_type='unimportant')
+
class SmoothnessBenchmark(multi_page_benchmark.MultiPageBenchmark):
def __init__(self):
super(SmoothnessBenchmark, self).__init__('scrolling')
@@ -143,6 +170,7 @@ class SmoothnessBenchmark(multi_page_benchmark.MultiPageBenchmark):
CalcScrollResults(rendering_stats_deltas, results)
CalcPaintingResults(rendering_stats_deltas, results)
CalcTextureUploadResults(rendering_stats_deltas, results)
+ CalcImageDecodingResults(rendering_stats_deltas, results)
if self.options.report_all_results:
for k, v in rendering_stats_deltas.iteritems():
« no previous file with comments | « cc/tile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698