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

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

Issue 1908513002: Add mutator utilization metric. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Created 4 years, 8 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
Index: tracing/tracing/metrics/v8/gc_metric_test.html
diff --git a/tracing/tracing/metrics/v8/gc_metric_test.html b/tracing/tracing/metrics/v8/gc_metric_test.html
index 9de44bad514569517e97c89e27f20e2db4aeed76..6001277417115f0b608c440c80b27f5b67522bf7 100644
--- a/tracing/tracing/metrics/v8/gc_metric_test.html
+++ b/tracing/tracing/metrics/v8/gc_metric_test.html
@@ -209,5 +209,39 @@ tr.b.unittest.testSuite(function() {
});
});
+ test('mutatorUtilization', function() {
+ var valueList = new tr.metrics.ValueList();
+ 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, 16, [{start: 50, end: 60}, {start: 110, end: 120}]);
+ var pct95 = mutatorUtilization.percentile(1 - 0.95) * 100;
+ var pct99 = mutatorUtilization.percentile(1 - 0.99) * 100;
+ var actual = run(slices);
+ var expected = {
+ mutator_utilization_pct95: pct95,
+ mutator_utilization_pct99: pct99,
+ };
+ tr.b.iterItems(expected, function(key, value) {
+ assert.equal(key + ':' + value, key + ':' + actual['Animation-' + key]);
+ });
+ });
+
});
</script>

Powered by Google App Engine
This is Rietveld 408576698