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

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

Issue 2698003004: Add a function that computes contribution of selected events to EQT. (Closed)
Patch Set: Fix 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 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>
« 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