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

Unified Diff: tracing/tracing/value/diagnostics/composition.html

Issue 2293533002: Refactor NumericBuilder to HistogramBinBoundaries. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: rebase Created 4 years, 4 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/v8/gc_metric.html ('k') | tracing/tracing/value/diagnostics/composition_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/diagnostics/composition.html
diff --git a/tracing/tracing/value/diagnostics/composition.html b/tracing/tracing/value/diagnostics/composition.html
index 1c88c3716ba42ce7900d9159acb50aa49d0e1b48..b1eda595142f74b0327feb331ccb3de1a740d30e 100644
--- a/tracing/tracing/value/diagnostics/composition.html
+++ b/tracing/tracing/value/diagnostics/composition.html
@@ -83,14 +83,15 @@ tr.exportTo('tr.v.d', function() {
* @param {!tr.v.ValueSet} values
* @param {string} namePrefix
* @param {!tr.model.EventSet} events
- * @param {!tr.v.NumericBuilder} numericBuilder
* @param {!function(!tr.model.Event):string} categoryForEvent
+ * @param {!tr.v.Unit} unit
* @param {!function(!tr.model.Event):number=} opt_sampleForEvent
+ * @param {!tr.v.HistogramBinBoundaries=} opt_binBoundaries
* @param {*=} opt_this
* @return {!Composition}
*/
- static buildFromEvents(values, namePrefix, events, numericBuilder,
- categoryForEvent, opt_sampleForEvent, opt_this) {
+ static buildFromEvents(values, namePrefix, events, categoryForEvent, unit,
+ opt_sampleForEvent, opt_binBoundaries, opt_this) {
var sampleForEvent = opt_sampleForEvent || ((event) => event.cpuSelfTime);
var composition = new Composition();
@@ -102,8 +103,8 @@ tr.exportTo('tr.v.d', function() {
var eventCategory = categoryForEvent.call(opt_this, event);
var value = composition.get(eventCategory);
if (value === undefined) {
- value = new tr.v.NumericValue(
- namePrefix + eventCategory, numericBuilder.build());
+ value = new tr.v.NumericValue(namePrefix + eventCategory,
+ new tr.v.Histogram(unit, opt_binBoundaries));
values.addValue(value);
composition.set(eventCategory, value);
}
« no previous file with comments | « tracing/tracing/metrics/v8/gc_metric.html ('k') | tracing/tracing/value/diagnostics/composition_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698