summaryrefslogtreecommitdiff
path: root/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-04 14:17:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-05 10:05:06 +0000
commit39d357e3248f80abea0159765ff39554affb40db (patch)
treeaba0e6bfb76de0244bba0f5fdbd64b830dd6e621 /chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html
parent87778abf5a1f89266f37d1321b92a21851d8244d (diff)
downloadqtwebengine-chromium-39d357e3248f80abea0159765ff39554affb40db.tar.gz
BASELINE: Update Chromium to 55.0.2883.105
And updates ninja to 1.7.2 Change-Id: I20d43c737f82764d857ada9a55586901b18b9243 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html')
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html90
1 files changed, 52 insertions, 38 deletions
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html
index f47020e25b7..c028524b339 100644
--- a/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html
+++ b/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html
@@ -7,8 +7,8 @@ found in the LICENSE file.
<link rel="import" href="/tracing/base/iteration_helpers.html">
<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/value/numeric.html">
-<link rel="import" href="/tracing/value/value.html">
+<link rel="import" href="/tracing/value/diagnostics/diagnostic_map.html">
+<link rel="import" href="/tracing/value/histogram.html">
<script>
'use strict';
@@ -16,11 +16,20 @@ found in the LICENSE file.
tr.exportTo('tr.metrics', function() {
var MEMORY_INFRA_TRACING_CATEGORY = 'disabled-by-default-memory-infra';
+ var TIME_BOUNDARIES = tr.v.HistogramBinBoundaries.createExponential(
+ 1e-3, 1e5, 30);
+
+ var BYTE_BOUNDARIES = tr.v.HistogramBinBoundaries.createExponential(
+ 1, 1e9, 30);
+
+ var COUNT_BOUNDARIES = tr.v.HistogramBinBoundaries.createExponential(
+ 1, 1e5, 30);
+
function addTimeDurationValue(valueName, duration, allValues) {
- var scalarNumericValue = new tr.v.ScalarNumeric(
- tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, duration);
- var numericValue = new tr.v.NumericValue(valueName, scalarNumericValue);
- allValues.addValue(numericValue);
+ var hist = new tr.v.Histogram(valueName,
+ tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TIME_BOUNDARIES);
+ hist.addSample(duration);
+ allValues.addHistogram(hist);
}
// Adds values specific to memory-infra dumps.
@@ -34,7 +43,7 @@ tr.exportTo('tr.metrics', function() {
var overheadByProvider = {};
tr.b.iterItems(model.processes, function(pid, process) {
tr.b.iterItems(process.threads, function(tid, thread) {
- tr.b.iterItems(thread.sliceGroup.slices, function(slice_id, slice) {
+ tr.b.iterItems(thread.sliceGroup.slices, (unusedSliceId, slice) => {
if (slice.category !== MEMORY_INFRA_TRACING_CATEGORY)
return;
totalOverhead += slice.duration;
@@ -42,8 +51,13 @@ tr.exportTo('tr.metrics', function() {
nonMemoryInfraThreadOverhead += slice.duration;
if (slice.args && slice.args['dump_provider.name']) {
var providerName = slice.args['dump_provider.name'];
- overheadByProvider[providerName] =
- (overheadByProvider[providerName] || 0) + slice.duration;
+ var durationAndCount = overheadByProvider[providerName];
+ if (durationAndCount === undefined) {
+ overheadByProvider[providerName] = durationAndCount =
+ {duration: 0, count: 0};
+ }
+ durationAndCount.duration += slice.duration;
+ durationAndCount.count++;
}
});
});
@@ -58,24 +72,23 @@ tr.exportTo('tr.metrics', function() {
nonMemoryInfraThreadOverhead / memoryDumpCount, values);
tr.b.iterItems(overheadByProvider, function(providerName, overhead) {
addTimeDurationValue(
- 'Average CPU overhead of ' + providerName + ' per memory-infra dump',
- overhead / memoryDumpCount, values);
+ 'Average CPU overhead of ' + providerName + ' per OnMemoryDump call',
+ overhead.duration / overhead.count, values);
});
var memoryInfraEventsSize =
categoryNamesToTotalEventSizes.get(MEMORY_INFRA_TRACING_CATEGORY);
- var memoryInfraTraceBytesValue = new tr.v.ScalarNumeric(
- tr.v.Unit.byName.sizeInBytes_smallerIsBetter, memoryInfraEventsSize);
- values.addValue(new tr.v.NumericValue(
+ var memoryInfraTraceBytesValue = new tr.v.Histogram(
'Total trace size of memory-infra dumps in bytes',
- memoryInfraTraceBytesValue));
+ tr.b.Unit.byName.sizeInBytes_smallerIsBetter, BYTE_BOUNDARIES);
+ memoryInfraTraceBytesValue.addSample(memoryInfraEventsSize);
+ values.addHistogram(memoryInfraTraceBytesValue);
- var traceBytesPerDumpValue = new tr.v.ScalarNumeric(
- tr.v.Unit.byName.sizeInBytes_smallerIsBetter,
- memoryInfraEventsSize / memoryDumpCount);
- values.addValue(new tr.v.NumericValue(
+ var traceBytesPerDumpValue = new tr.v.Histogram(
'Average trace size of memory-infra dumps in bytes',
- traceBytesPerDumpValue));
+ tr.b.Unit.byName.sizeInBytes_smallerIsBetter, BYTE_BOUNDARIES);
+ traceBytesPerDumpValue.addSample(memoryInfraEventsSize / memoryDumpCount);
+ values.addHistogram(traceBytesPerDumpValue);
}
function tracingMetric(values, model) {
@@ -145,35 +158,36 @@ tr.exportTo('tr.metrics', function() {
var maxEventBytesPerCategory = maxCatNameAndBytes[1];
var categoryWithMaxEventBytes = maxCatNameAndBytes[0];
- var maxEventCountPerSecValue = new tr.v.ScalarNumeric(
- tr.v.Unit.byName.unitlessNumber_smallerIsBetter, maxEventCountPerSec);
- var maxEventBytesPerSecValue = new tr.v.ScalarNumeric(
- tr.v.Unit.byName.sizeInBytes_smallerIsBetter, maxEventBytesPerSec);
- var totalTraceBytesValue = new tr.v.ScalarNumeric(
- tr.v.Unit.byName.sizeInBytes_smallerIsBetter, totalTraceBytes);
+ var maxEventCountPerSecValue = new tr.v.Histogram(
+ 'Max number of events per second',
+ tr.b.Unit.byName.count_smallerIsBetter, COUNT_BOUNDARIES);
+ maxEventCountPerSecValue.addSample(maxEventCountPerSec);
+
+ var maxEventBytesPerSecValue = new tr.v.Histogram(
+ 'Max event size in bytes per second',
+ tr.b.Unit.byName.sizeInBytes_smallerIsBetter, BYTE_BOUNDARIES);
+ maxEventBytesPerSecValue.addSample(maxEventBytesPerSec);
+
+ var totalTraceBytesValue = new tr.v.Histogram('Total trace size in bytes',
+ tr.b.Unit.byName.sizeInBytes_smallerIsBetter, BYTE_BOUNDARIES);
+ totalTraceBytesValue.addSample(totalTraceBytes);
var biggestCategory = {
name: categoryWithMaxEventBytes,
size_in_bytes: maxEventBytesPerCategory
};
- var totalBytes = new tr.v.NumericValue(
- 'Total trace size in bytes', totalTraceBytesValue);
- totalBytes.diagnostics.add(
+ totalTraceBytesValue.diagnostics.set(
'category_with_max_event_size', new tr.v.d.Generic(biggestCategory));
- values.addValue(totalBytes);
+ values.addHistogram(totalTraceBytesValue);
- var peakEvents = new tr.v.NumericValue(
- 'Max number of events per second', maxEventCountPerSecValue);
- peakEvents.diagnostics.add(
+ maxEventCountPerSecValue.diagnostics.set(
'category_with_max_event_size', new tr.v.d.Generic(biggestCategory));
- values.addValue(peakEvents);
+ values.addHistogram(maxEventCountPerSecValue);
- var peakBytes = new tr.v.NumericValue(
- 'Max event size in bytes per second', maxEventBytesPerSecValue);
- peakBytes.diagnostics.add(
+ maxEventBytesPerSecValue.diagnostics.set(
'category_with_max_event_size', new tr.v.d.Generic(biggestCategory));
- values.addValue(peakBytes);
+ values.addHistogram(maxEventBytesPerSecValue);
addMemoryInfraValues(values, model, categoryNamesToTotalEventSizes);
}