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

Unified Diff: tracing/tracing/metrics/tracing_metric_test.html

Issue 2334233003: Merge NumericValue into Histogram (Closed)
Patch Set: fix rail_power_metric Created 4 years, 3 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/tracing_metric.html ('k') | tracing/tracing/metrics/v8/execution_metric.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/tracing_metric_test.html
diff --git a/tracing/tracing/metrics/tracing_metric_test.html b/tracing/tracing/metrics/tracing_metric_test.html
index 440482cb84a6b0d0c44c1ed198efbb0d766a7f94..2f123162dab0c829945d84d94e58821edb91272f 100644
--- a/tracing/tracing/metrics/tracing_metric_test.html
+++ b/tracing/tracing/metrics/tracing_metric_test.html
@@ -30,7 +30,7 @@ tr.b.unittest.testSuite(function() {
function checkDurationValue(allValues, metricName, expected) {
var value = tr.b.getOnlyElement(allValues.getValuesNamed(metricName));
- assert.closeTo(1000 * value.numeric.average, expected, 0.1);
+ assert.closeTo(1000 * value.average, expected, 0.1);
}
test('hasEventSizesInBytes', function() {
@@ -63,7 +63,7 @@ tr.b.unittest.testSuite(function() {
var eventStringSize = getEventStringSize(events, [0, 1]);
var value = tr.b.getOnlyElement(allValues.getValuesNamed(
'Total trace size in bytes'));
- assert.strictEqual(value.numeric.average, eventStringSize);
+ assert.strictEqual(value.average, eventStringSize);
});
test('maxValuePerSec', function() {
@@ -83,12 +83,12 @@ tr.b.unittest.testSuite(function() {
var maxEventCountPerSec = 3;
var value = tr.b.getOnlyElement(allValues.getValuesNamed(
'Max number of events per second'));
- assert.strictEqual(value.numeric.average, maxEventCountPerSec);
+ assert.strictEqual(value.average, maxEventCountPerSec);
var maxEventBytesPerSec = getEventStringSize(events, [2, 3, 5]);
value = tr.b.getOnlyElement(allValues.getValuesNamed(
'Max event size in bytes per second'));
- assert.strictEqual(value.numeric.average, maxEventBytesPerSec);
+ assert.strictEqual(value.average, maxEventBytesPerSec);
});
test('diagnostics', function() {
@@ -104,12 +104,6 @@ tr.b.unittest.testSuite(function() {
tr.metrics.tracingMetric(allValues, model);
for (var value of allValues) {
- // TODO(benjhayden): Remove this after statistics scalars are moved to
- // python.
- if (!(value instanceof tr.v.NumericValue) ||
- !(value.numeric instanceof tr.v.Histogram))
- continue;
-
var d = value.diagnostics.get('category_with_max_event_size').value;
assert.strictEqual(d.name, 'foo');
assert.strictEqual(d.size_in_bytes, getEventStringSize(
@@ -147,10 +141,10 @@ tr.b.unittest.testSuite(function() {
(acc, slice) => acc + JSON.stringify(slice).length, 0);
var totalSizeValue = tr.b.getOnlyElement(allValues.getValuesNamed(
'Total trace size of memory-infra dumps in bytes'));
- assert.strictEqual(totalSizeValue.numeric.average, memoryCategorySize);
+ assert.strictEqual(totalSizeValue.average, memoryCategorySize);
var sizePerDumpValue = tr.b.getOnlyElement(allValues.getValuesNamed(
'Average trace size of memory-infra dumps in bytes'));
- assert.strictEqual(sizePerDumpValue.numeric.average, memoryCategorySize);
+ assert.strictEqual(sizePerDumpValue.average, memoryCategorySize);
checkDurationValue(allValues,
'Average CPU overhead of mdp1 per OnMemoryDump call', 6.5);
« no previous file with comments | « tracing/tracing/metrics/tracing_metric.html ('k') | tracing/tracing/metrics/v8/execution_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698