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

Unified Diff: tracing/tracing/value/ui/histogram_set_table.html

Issue 3009553002: Refactor Histogram relationship diagnostics. (Closed)
Patch Set: Created 3 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/value/ui/histogram_set_table.html
diff --git a/tracing/tracing/value/ui/histogram_set_table.html b/tracing/tracing/value/ui/histogram_set_table.html
index 1d97ca6ace9f0048c17d8c0feeacf7c790b18e73..58f3a0e87c5d2ddc28cfab7b303dc55e1ccdfcea 100644
--- a/tracing/tracing/value/ui/histogram_set_table.html
+++ b/tracing/tracing/value/ui/histogram_set_table.html
@@ -195,23 +195,24 @@ tr.exportTo('tr.v.ui', function() {
if (tableRowsDirty) {
await this.progress_('Filtering rows...');
- let filteredHistograms = this.viewState.showAll ?
- this.histograms : this.sourceHistograms_;
+ const filteredHistogramNames = new Set();
+ let query;
if (this.viewState.searchQuery) {
- let query = undefined;
try {
query = new RegExp(this.viewState.searchQuery);
} catch (e) {
}
- if (query !== undefined) {
- filteredHistograms = new tr.v.HistogramSet(
- [...filteredHistograms].filter(
- hist => hist.name.match(query)));
+ }
+ for (const hist of this.viewState.showAll ?
+ this.histograms : this.sourceHistograms_) {
+ if (query === undefined ||
+ hist.name.match(query)) {
+ filteredHistogramNames.add(hist.name);
}
}
const filteredHierarchies = tr.v.HistogramSetHierarchy.filter(
- this.hierarchies_, filteredHistograms);
+ this.hierarchies_, filteredHistogramNames);
// Wait to set this.$.table.tableRows until we're ready for it to build
// DOM. When tableRows are set on it, tr-ui-b-table calls
@@ -219,7 +220,7 @@ tr.exportTo('tr.v.ui', function() {
// but that can happen in between the next await, which is too early.
this.tableRows_ = filteredHierarchies.map(hierarchy =>
new tr.v.ui.HistogramSetTableRow(
- hierarchy, this.$.table, this.viewState));
+ hierarchy, this.$.table, this.histograms, this.viewState));
tr.b.Timing.instant('histogram-set-table', 'rootRowCount',
this.tableRows_.length);
« no previous file with comments | « tracing/tracing/value/ui/diagnostic_span_behavior.html ('k') | tracing/tracing/value/ui/histogram_set_table_cell.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698