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

Unified Diff: tracing/tracing/base/running_statistics_test.html

Issue 2364243002: Serialize Histograms more efficiently. (Closed)
Patch Set: RunningStatistics.asDict undefined 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
Index: tracing/tracing/base/running_statistics_test.html
diff --git a/tracing/tracing/base/running_statistics_test.html b/tracing/tracing/base/running_statistics_test.html
index f16cbe797818392de0856731873cfb76bbb6bd12..ab27bafc089b66f9dacee6b38386fc24963a8bfd 100644
--- a/tracing/tracing/base/running_statistics_test.html
+++ b/tracing/tracing/base/running_statistics_test.html
@@ -183,8 +183,13 @@ tr.b.unittest.testSuite(function() {
var data = [1, 2, 3];
var dict = run(data).asDict();
var cloneDict = RunningStatistics.fromDict(dict).asDict();
- for (var field in dict)
+ for (var field = 0; field < dict.length; ++field) {
assert.closeTo(dict[field], cloneDict[field], 1e-6);
+ }
+
+ // You can change this number, but when you do, please explain in your CL
+ // description why it changed.
+ assert.strictEqual(32, JSON.stringify(dict).length);
});
});
</script>

Powered by Google App Engine
This is Rietveld 408576698