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

Unified Diff: tools/perf/metrics/smoothness_unittest.py

Issue 23506030: telemetry: Add new metrics to smoothness benchmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/metrics/smoothness.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/smoothness_unittest.py
diff --git a/tools/perf/metrics/smoothness_unittest.py b/tools/perf/metrics/smoothness_unittest.py
index 59d830ac07dca8882a2dd54a621a7551db96de82..c0e3682d962f128297d284b21fdf9b0dc7be7dcd 100644
--- a/tools/perf/metrics/smoothness_unittest.py
+++ b/tools/perf/metrics/smoothness_unittest.py
@@ -4,6 +4,7 @@
import unittest
import random
+from metrics import discrepancy
from metrics import smoothness
from metrics.gpu_rendering_stats import GpuRenderingStats
from telemetry.page import page
@@ -238,6 +239,16 @@ class SmoothnessMetricsUnitTest(unittest.TestCase):
round(rs['totalTimeInSeconds'] / rs['numFramesSentToScreen'] * 1000.0,
3),
res.page_results[0]['mean_frame_time'].value, 2)
+ # We don't verify the correctness of the discrepancy computation
+ # itself, because we have a separate unit test for that purpose.
+ self.assertEquals(
+ round(discrepancy.FrameDiscrepancy(stats.screen_frame_timestamps,
+ True), 4),
+ res.page_results[0]['absolute_frame_discrepancy'].value)
+ self.assertEquals(
+ round(discrepancy.FrameDiscrepancy(stats.screen_frame_timestamps,
+ False), 4),
+ res.page_results[0]['relative_frame_discrepancy'].value)
self.assertAlmostEquals(
round(rs['droppedFrameCount'] / rs['numFramesSentToScreen'] * 100.0, 1),
res.page_results[0]['dropped_percent'].value)
« no previous file with comments | « tools/perf/metrics/smoothness.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698