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 265692b9b26f980f8a4dbf20265dd88321785b73..617ff743257ca5a310ebb8de7979029431cfd022 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 |
@@ -36,7 +36,7 @@ tr.b.unittest.testSuite(function() { |
})); |
} |
- test('estimatedInputLatency', function() { |
+ test('expectedQueueingTime', function() { |
let model = tr.c.TestUtils.newModel((model) => { |
let rendererProcess = model.getOrCreateProcess(1984); |
let mainThread = rendererProcess.getOrCreateThread(2); |
@@ -62,7 +62,7 @@ tr.b.unittest.testSuite(function() { |
})); |
}); |
let values = new tr.v.HistogramSet(); |
- tr.metrics.sh.estimatedInputLatency(values, model); |
+ tr.metrics.sh.expectedQueueingTimeMetric(values, model); |
let interactiveEQT = values.getHistogramNamed( |
'interactive:500ms_window:renderer_eqt'); |
assert.equal(0.1, interactiveEQT.average); |
@@ -71,7 +71,7 @@ tr.b.unittest.testSuite(function() { |
assert.equal(10, totalEQT.average); |
}); |
- test('estimatedInputLatency_noInteractive', function() { |
+ test('expectedQueueingTime_noInteractive', function() { |
let model = tr.c.TestUtils.newModel((model) => { |
let rendererProcess = model.getOrCreateProcess(1984); |
let mainThread = rendererProcess.getOrCreateThread(2); |
@@ -96,13 +96,13 @@ tr.b.unittest.testSuite(function() { |
})); |
}); |
let values = new tr.v.HistogramSet(); |
- tr.metrics.sh.estimatedInputLatency(values, model); |
+ tr.metrics.sh.expectedQueueingTimeMetric(values, model); |
let interactiveEQT = values.getHistogramNamed( |
'interactive:500ms_window:renderer_eqt'); |
assert.equal(0, interactiveEQT.numValues); |
}); |
- test('estimatedInputLatency_multipleInteractive', function() { |
+ test('expectedQueueingTime_multipleInteractive', function() { |
let model = tr.c.TestUtils.newModel((model) => { |
let rendererProcess = model.getOrCreateProcess(1984); |
let mainThread = rendererProcess.getOrCreateThread(2); |
@@ -129,7 +129,7 @@ tr.b.unittest.testSuite(function() { |
})); |
}); |
let values = new tr.v.HistogramSet(); |
- tr.metrics.sh.estimatedInputLatency(values, model); |
+ tr.metrics.sh.expectedQueueingTimeMetric(values, model); |
let interactiveEQT = values.getHistogramNamed( |
'interactive:500ms_window:renderer_eqt'); |
// TODO(ulan): Support multiple interactive time windows when |
@@ -137,7 +137,7 @@ tr.b.unittest.testSuite(function() { |
assert.equal(0, interactiveEQT.numValues); |
}); |
- test('estimatedInputLatency_multipleRenderersAggregates', function() { |
+ test('expectedQueueingTime_multipleRenderersAggregates', function() { |
let model = tr.c.TestUtils.newModel(function(model) { |
let rendererProcess = model.getOrCreateProcess(1984); |
let mainThread = rendererProcess.getOrCreateThread(2); |
@@ -173,10 +173,66 @@ tr.b.unittest.testSuite(function() { |
})); |
}); |
let values = new tr.v.HistogramSet(); |
- tr.metrics.sh.estimatedInputLatency(values, model); |
+ tr.metrics.sh.expectedQueueingTimeMetric(values, model); |
let eqt = values.getHistogramNamed( |
'interactive:500ms_window:renderer_eqt'); |
assert.equal(0.05, eqt.average); |
}); |
+ |
+ test('contributionToExpectedQueueingTime', function() { |
+ let model = tr.c.TestUtils.newModel((model) => { |
+ let rendererProcess = model.getOrCreateProcess(1984); |
+ let mainThread = rendererProcess.getOrCreateThread(2); |
+ mainThread.name = 'CrRendererMain'; |
+ addInteractiveTimestamp(rendererProcess, mainThread, 200); |
+ mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({ |
+ cat: 'toplevel', |
+ title: 'TaskQueueManager::ProcessTaskFromWorkQueue', |
+ start: 0, |
+ duration: 100, |
+ })); |
+ mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({ |
+ cat: 'v8', |
+ title: 'V8.GCFinalizeMC', |
+ start: 50, |
+ duration: 50, |
+ })); |
+ mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({ |
+ cat: 'toplevel', |
+ title: 'TaskQueueManager::ProcessTaskFromWorkQueue', |
+ start: 3000, |
+ duration: 10, |
+ })); |
+ mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({ |
+ cat: 'v8', |
+ title: 'V8.GCFinalizeMC', |
+ start: 3000, |
+ duration: 5, |
+ })); |
+ mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({ |
+ cat: 'toplevel', |
+ title: 'TaskQueueManager::ProcessTaskFromWorkQueue', |
+ start: 9000, |
+ duration: 10, |
+ })); |
+ mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({ |
+ cat: 'v8', |
+ title: 'V8.GCFinalizeMC', |
+ start: 9000, |
+ duration: 5, |
+ })); |
+ mainThread.sliceGroup.createSubSlices(); |
+ }); |
+ let values = new tr.v.HistogramSet(); |
+ tr.metrics.sh.contributionToExpectedQueueingTime( |
+ (event => event.title === 'V8.GCFinalizeMC'), 'v8:gc', |
+ values, model); |
+ let interactiveEQT = values.getHistogramNamed( |
+ 'interactive:500ms_window:renderer_eqt:v8:gc'); |
+ assert.equal(0.025, interactiveEQT.average); |
+ let totalEQT = values.getHistogramNamed( |
+ 'total:500ms_window:renderer_eqt:v8:gc'); |
+ assert.equal(2.5, totalEQT.average); |
+ }); |
}); |
</script> |