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

Unified Diff: tracing/tracing/metrics/blink/gc_metric_test.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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/blink/gc_metric.html ('k') | tracing/tracing/metrics/discover_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/blink/gc_metric_test.html
diff --git a/tracing/tracing/metrics/v8/gc_metric_test.html b/tracing/tracing/metrics/blink/gc_metric_test.html
similarity index 57%
copy from tracing/tracing/metrics/v8/gc_metric_test.html
copy to tracing/tracing/metrics/blink/gc_metric_test.html
index a0e32cfdbb5c09c392aef11f643a793e9f6acf6d..c986542a842be24db0caaaefd930ce44243982e7 100644
--- a/tracing/tracing/metrics/v8/gc_metric_test.html
+++ b/tracing/tracing/metrics/blink/gc_metric_test.html
@@ -7,7 +7,7 @@ found in the LICENSE file.
<link rel="import" href="/tracing/core/test_utils.html">
<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/metrics/v8/gc_metric.html">
+<link rel="import" href="/tracing/metrics/blink/gc_metric.html">
<link rel="import" href="/tracing/model/slice_group.html">
<link rel="import" href="/tracing/value/value_set.html">
@@ -19,17 +19,13 @@ tr.b.unittest.testSuite(function() {
function createModel(start, end, slices) {
var opts = {
customizeModelCallback: function(model) {
- var group = new tr.model.SliceGroup(tr.c.TestUtils.newFakeThread());
- var ue = new tr.model.um.AnimationExpectation(
- model, 'test', start, end);
+ var process = model.getOrCreateProcess(1);
+ var thread = process.getOrCreateThread(2);
+ var group = thread.sliceGroup;
slices.forEach(function(slice) {
group.pushSlice(tr.c.TestUtils.newSliceEx(slice));
});
group.createSubSlices();
- group.slices.forEach(function(slice) {
- ue.associatedEvents.push(slice);
- });
- model.userModel.expectations.push(ue);
}
};
var model = tr.c.TestUtils.newModelWithEvents([], opts);
@@ -37,7 +33,7 @@ tr.b.unittest.testSuite(function() {
}
function constructName(name, suffix) {
- return 'Animation-' + name + '_' + suffix;
+ return name + '_' + suffix;
}
function run(slices) {
@@ -45,7 +41,7 @@ tr.b.unittest.testSuite(function() {
var startTime = slices.reduce((acc, slice) => (Math.min(acc, slice.start)));
var endTime = slices.reduce((acc, slice) => (Math.max(acc, slice.end)));
var model = createModel(startTime - 1, endTime + 1, slices);
- tr.metrics.v8.gcMetric(values, model);
+ tr.metrics.blink.blinkGcMetric(values, model);
var result = {};
values.valueDicts.forEach(function(value) {
result[value.name] = value.numeric.value;
@@ -55,14 +51,9 @@ tr.b.unittest.testSuite(function() {
test('topEvents', function() {
var events = {
- 'V8.GCCompactor': 'v8-gc-full-mark-compactor',
- 'V8.GCFinalizeMC': 'v8-gc-latency-mark-compactor',
- 'V8.GCFinalizeMCReduceMemory': 'v8-gc-memory-mark-compactor',
- 'V8.GCIncrementalMarking': 'v8-gc-incremental-step',
- 'V8.GCIncrementalMarkingFinalize': 'v8-gc-incremental-finalize',
- 'V8.GCIncrementalMarkingStart': 'v8-gc-incremental-start',
- 'V8.GCPhantomHandleProcessingCallback' : 'v8-gc-phantom-handle-callback',
- 'V8.GCScavenger': 'v8-gc-scavenger'
+ 'BlinkGCMarking': 'blink-gc-marking',
+ 'ThreadState::completeSweep': 'blink-gc-complete-sweep',
+ 'ThreadState::performIdleLazySweep': 'blink-gc-idle-lazy-sweep'
};
tr.b.iterItems(events, function(timelineName, telemetryName) {
var slices = [
@@ -102,7 +93,7 @@ tr.b.unittest.testSuite(function() {
cpuStart: 100, cpuEnd: 200
},
{
- title: 'V8.GCFinalizeMC', args: {}, start: 110, end: 190,
+ title: 'BlinkGCMarking', args: {}, start: 110, end: 190,
cpuStart: 110, cpuEnd: 190
}
];
@@ -121,7 +112,7 @@ tr.b.unittest.testSuite(function() {
percentage_idle: 100
};
tr.b.iterItems(expected, function(key, value) {
- var name = constructName('v8-gc-latency-mark-compactor', key);
+ var name = constructName('blink-gc-marking', key);
assert.equal(name + ':' + actual[name], name + ':' + value);
});
});
@@ -135,7 +126,7 @@ tr.b.unittest.testSuite(function() {
cpuStart: 100, cpuEnd: 200
},
{
- title: 'V8.GCFinalizeMC', args: {}, start: 110, end: 190,
+ title: 'BlinkGCMarking', args: {}, start: 110, end: 190,
cpuStart: 110, cpuEnd: 190
}
];
@@ -154,46 +145,21 @@ tr.b.unittest.testSuite(function() {
percentage_idle: 100 / 8
};
tr.b.iterItems(expected, function(key, value) {
- var name = constructName('v8-gc-latency-mark-compactor', key);
+ var name = constructName('blink-gc-marking', key);
assert.equal(name + ':' + actual[name], name + ':' + value);
});
});
- test('subEvents', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'V8.GCFinalizeMC', args: {}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'V8.GC_MC_MARK', args: {}, start: 110, end: 190,
- cpuStart: 110, cpuEnd: 190
- },
- ];
- var actual = run(slices);
- var expected = {
- avg: 80,
- max: 80,
- };
- var telemetryName = 'v8-gc-latency-mark-compactor-mark';
- tr.b.iterItems(expected, function(key, value) {
- var name = constructName(telemetryName, key);
- assert.equal(name + ':' + actual[name], name + ':' + value);
- });
- assert.closeTo(actual[constructName(telemetryName, 'pct_090')], 80, 1);
- });
-
test('total', function() {
var values = new tr.v.ValueSet();
var slices = [
{
- title: 'V8.GCFinalizeMC', args: {}, start: 100, end: 200,
+ title: 'BlinkGCMarking', args: {}, start: 100, end: 200,
cpuStart: 100, cpuEnd: 200
},
{
- title: 'V8.GCIncrementalMarking', args: {}, start: 210, end: 290,
- cpuStart: 210, cpuEnd: 290
+ title: 'ThreadState::performIdleLazySweep', args: {}, start: 210,
+ end: 290, cpuStart: 210, cpuEnd: 290
}
];
var actual = run(slices);
@@ -211,42 +177,10 @@ tr.b.unittest.testSuite(function() {
percentage_idle: 0
};
tr.b.iterItems(expected, function(key, value) {
- var name = constructName('v8-gc-total', key);
+ var name = constructName('blink-gc-total', key);
assert.equal(name + ':' + actual[name], name + ':' + value);
});
});
- test('mutatorUtilization', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'V8.Execute', args: {}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'V8.GCFinalizeMC', args: {}, start: 150, end: 160,
- cpuStart: 150, cpuEnd: 160
- },
- {
- title: 'V8.Execute', args: {}, start: 1000, end: 1200,
- cpuStart: 1000, cpuEnd: 1200
- },
- {
- title: 'V8.GCIncrementalMarking', args: {}, start: 1010, end: 1020,
- cpuStart: 1010, cpuEnd: 1020
- }
- ];
- var mutatorUtilization = tr.metrics.v8.utils.mutatorUtilization(
- 0, 300, tr.metrics.v8.WINDOW_SIZE_MS,
- [{start: 50, end: 60}, {start: 110, end: 120}]);
- var actual = run(slices);
- assert.strictEqual(
- actual['Animation-v8-execute-mutator-utilization_pct_095'],
- mutatorUtilization.percentile(1 - 0.95) * 100);
- assert.strictEqual(
- actual['Animation-v8-execute-mutator-utilization_pct_099'],
- mutatorUtilization.percentile(1 - 0.99) * 100);
- });
-
});
</script>
« no previous file with comments | « tracing/tracing/metrics/blink/gc_metric.html ('k') | tracing/tracing/metrics/discover_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698