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

Unified Diff: tracing/tracing/metrics/system_health/estimated_input_latency_metric_test.html

Issue 2696053002: Make estimatedInputLatency metric more friendly for traces without TTI. (Closed)
Patch Set: Address Ben's comment Created 3 years, 10 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 | « tracing/tracing/metrics/system_health/estimated_input_latency_metric.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/system_health/estimated_input_latency_metric_test.html
diff --git a/tracing/tracing/metrics/system_health/estimated_input_latency_metric_test.html b/tracing/tracing/metrics/system_health/estimated_input_latency_metric_test.html
index 097b3359469dfb6b4859340610afbf3faea953e3..f7c1fe4980317900cb1bac9a5ce69fe7592c6459 100644
--- a/tracing/tracing/metrics/system_health/estimated_input_latency_metric_test.html
+++ b/tracing/tracing/metrics/system_health/estimated_input_latency_metric_test.html
@@ -64,12 +64,15 @@ tr.b.unittest.testSuite(function() {
});
let values = new tr.v.HistogramSet();
tr.metrics.sh.estimatedInputLatency(values, model);
- let eqt = values.getHistogramNamed(
+ let interactiveEQT = values.getHistogramNamed(
'interactive:500ms_window:renderer_eqt');
- assert.equal(0.1, eqt.average);
+ assert.equal(0.1, interactiveEQT.average);
+ let totalEQT = values.getHistogramNamed(
+ 'total:500ms_window:renderer_eqt');
+ assert.equal(10, totalEQT.average);
});
- test('estimatedInputLatency_noInteractiveThrows', function() {
+ test('estimatedInputLatency_noInteractive', function() {
let model = tr.c.TestUtils.newModel((model) => {
let rendererProcess = model.getOrCreateProcess(1984);
let mainThread = rendererProcess.getOrCreateThread(2);
@@ -94,12 +97,13 @@ tr.b.unittest.testSuite(function() {
}));
});
let values = new tr.v.HistogramSet();
- assert.throws(() => {
- tr.metrics.sh.estimatedInputLatency(values, model);
- }, 'getOnlyElement was passed an empty iterable.');
+ tr.metrics.sh.estimatedInputLatency(values, model);
+ let interactiveEQT = values.getHistogramNamed(
+ 'interactive:500ms_window:renderer_eqt');
+ assert.equal(0, interactiveEQT.numValues);
});
- test('estimatedInputLatency_multipleInteractiveThrows', function() {
+ test('estimatedInputLatency_multipleInteractive', function() {
let model = tr.c.TestUtils.newModel((model) => {
let rendererProcess = model.getOrCreateProcess(1984);
let mainThread = rendererProcess.getOrCreateThread(2);
@@ -126,9 +130,12 @@ tr.b.unittest.testSuite(function() {
}));
});
let values = new tr.v.HistogramSet();
- assert.throws(() => {
- tr.metrics.sh.estimatedInputLatency(values, model);
- }, 'getOnlyElement was passed an iterable with multiple elements.');
+ tr.metrics.sh.estimatedInputLatency(values, model);
+ let interactiveEQT = values.getHistogramNamed(
+ 'interactive:500ms_window:renderer_eqt');
+ // TODO(ulan): Support multiple interactive time windows when
+ // https://crbug.com/692112 is fixed.
+ assert.equal(0, interactiveEQT.numValues);
});
test('estimatedInputLatency_multipleRenderersAggregates', function() {
« no previous file with comments | « tracing/tracing/metrics/system_health/estimated_input_latency_metric.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698