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

Unified Diff: tracing/tracing/metrics/v8/gc_metric.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.html
diff --git a/tracing/tracing/metrics/v8/gc_metric.html b/tracing/tracing/metrics/v8/gc_metric.html
index 3243402f13b6da68883493752a8a9e43055aae57..3eed4e6c98a20e7f241ee8c6414ef0d2a6dc4b4a 100644
--- a/tracing/tracing/metrics/v8/gc_metric.html
+++ b/tracing/tracing/metrics/v8/gc_metric.html
@@ -21,6 +21,7 @@ tr.exportTo('tr.metrics.v8', function() {
addDurationOfSubEvents(valueList, model);
addIdleTimesOfTopEvents(valueList, model);
addTotalIdleTimesOfTopEvents(valueList, model);
+ addMutatorUtilization(valueList, model);
}
gcMetric.prototype = {
@@ -191,6 +192,47 @@ tr.exportTo('tr.metrics.v8', function() {
stageTitle + '-' + name + '_percentage_idle', percentage));
}
+ function addMutatorUtilization(valueList, model) {
+ groupAndProcessEvents(model,
+ tr.metrics.v8.utils.isTopV8ExecuteEvent,
+ event => 'v8.execute',
+ function(stageTitle, name, events) {
+ events.sort((a, b) => a.start - b.start);
+ var time = 0;
+ var pauses = [];
+ // Glue together the v8.execute events and adjust the GC pause
+ // times accordingly.
+ events.forEach(function(topEvent) {
+ topEvent.descendentSlices.forEach(function(e) {
eakuefner 2016/04/20 17:25:54 One thing overall about this metric that this CL c
ulan 2016/04/20 18:47:04 Partially done. Replaced descendentSlices with fin
+ if (tr.metrics.v8.utils.isTopGarbageCollectionEvent(e)) {
+ var start = e.start - topEvent.start + time;
+ var end = e.end - topEvent.start + time;
+ pauses.push({start: start, end: end});
+ }
+ });
+ time += topEvent.duration;
+ });
+ // Now we have one big v8.execute interval from 0 to |time| and
+ // a list of GC pauses.
+ var mutatorUtilization =
+ tr.metrics.v8.utils.mutatorUtilization(0, time, 16, pauses);
+ [0.95, 0.99].forEach(function(percent) {
+ var value = new tr.v.ScalarNumeric(percentage_biggerIsBetter,
+ mutatorUtilization.percentile(1.0 - percent) * 100);
+ valueList.addValue(
+ new tr.v.NumericValue(model.canonicalUrl,
+ stageTitle + '-mutator_utilization_pct' + percent * 100,
+ value));
+ });
+ var value = new tr.v.ScalarNumeric(percentage_biggerIsBetter,
+ mutatorUtilization.min());
+ valueList.addValue(
+ new tr.v.NumericValue(model.canonicalUrl,
+ stageTitle + '-mutator_utilization_min', value));
+ }
+ );
+ }
+
/**
* Filters events using the |filterCallback|, then groups events by the user
* expectation stage title and the name computed using the |nameCallback|,
« no previous file with comments | « no previous file | tracing/tracing/metrics/v8/gc_metric_test.html » ('j') | tracing/tracing/metrics/v8/utils.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698