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

Side by Side Diff: tracing/tracing/value/histogram.html

Issue 2998043002: Remove RelatedHistogramSet. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/iteration_helpers.html"> 8 <link rel="import" href="/tracing/base/iteration_helpers.html">
9 <link rel="import" href="/tracing/base/math/range.html"> 9 <link rel="import" href="/tracing/base/math/range.html">
10 <link rel="import" href="/tracing/base/math/running_statistics.html"> 10 <link rel="import" href="/tracing/base/math/running_statistics.html">
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 let bin = this.allBins[i]; 569 let bin = this.allBins[i];
570 if (bin.count === 0) { 570 if (bin.count === 0) {
571 bin = new HistogramBin(bin.range); 571 bin = new HistogramBin(bin.range);
572 this.allBins[i] = bin; 572 this.allBins[i] = bin;
573 } 573 }
574 bin.addBin(other.allBins[i]); 574 bin.addBin(other.allBins[i]);
575 } 575 }
576 576
577 let mergedFrom = this.diagnostics.get(tr.v.d.RESERVED_NAMES.MERGED_FROM); 577 let mergedFrom = this.diagnostics.get(tr.v.d.RESERVED_NAMES.MERGED_FROM);
578 if (!mergedFrom) { 578 if (!mergedFrom) {
579 mergedFrom = new tr.v.d.RelatedHistogramSet(); 579 mergedFrom = new tr.v.d.RelatedHistogramMap();
580 this.diagnostics.set(tr.v.d.RESERVED_NAMES.MERGED_FROM, mergedFrom); 580 this.diagnostics.set(tr.v.d.RESERVED_NAMES.MERGED_FROM, mergedFrom);
581 } 581 }
582 mergedFrom.add(other); 582 mergedFrom.set(mergedFrom.length, other);
583 583
584 let mergedTo = other.diagnostics.get(tr.v.d.RESERVED_NAMES.MERGED_TO); 584 let mergedTo = other.diagnostics.get(tr.v.d.RESERVED_NAMES.MERGED_TO);
585 if (!mergedTo) { 585 if (!mergedTo) {
586 mergedTo = new tr.v.d.RelatedHistogramSet(); 586 mergedTo = new tr.v.d.RelatedHistogramMap();
587 other.diagnostics.set(tr.v.d.RESERVED_NAMES.MERGED_TO, mergedTo); 587 other.diagnostics.set(tr.v.d.RESERVED_NAMES.MERGED_TO, mergedTo);
588 } 588 }
589 mergedTo.add(this); 589 mergedTo.set(mergedTo.length, this);
590 590
591 this.diagnostics.addDiagnostics(other.diagnostics); 591 this.diagnostics.addDiagnostics(other.diagnostics);
592 592
593 for (const [stat, option] of other.summaryOptions) { 593 for (const [stat, option] of other.summaryOptions) {
594 if (stat === 'percentile') { 594 if (stat === 'percentile') {
595 const percentiles = this.summaryOptions.get(stat); 595 const percentiles = this.summaryOptions.get(stat);
596 for (const percent of option) { 596 for (const percent of option) {
597 if (!percentiles.includes(percent)) percentiles.push(percent); 597 if (!percentiles.includes(percent)) percentiles.push(percent);
598 } 598 }
599 } else if (stat === 'iprs') { 599 } else if (stat === 'iprs') {
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 Histogram, 1421 Histogram,
1422 HistogramBinBoundaries, 1422 HistogramBinBoundaries,
1423 P_VALUE_NAME, 1423 P_VALUE_NAME,
1424 U_STATISTIC_NAME, 1424 U_STATISTIC_NAME,
1425 Z_SCORE_NAME, 1425 Z_SCORE_NAME,
1426 percentFromString, 1426 percentFromString,
1427 percentToString, 1427 percentToString,
1428 }; 1428 };
1429 }); 1429 });
1430 </script> 1430 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/diagnostics/unmergeable_diagnostic_set.html ('k') | tracing/tracing/value/histogram.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698