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

Unified Diff: perf_insights/perf_insights/ui/reports/coverage_report.html

Issue 1772833002: Remove SystemHealthMetric (fka RAILScore) (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: fix pi test Created 4 years, 9 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: perf_insights/perf_insights/ui/reports/coverage_report.html
diff --git a/perf_insights/perf_insights/ui/reports/coverage_report.html b/perf_insights/perf_insights/ui/reports/coverage_report.html
deleted file mode 100644
index 8b89cf2c7d4de489a2cb50471a72379a7c40e3bd..0000000000000000000000000000000000000000
--- a/perf_insights/perf_insights/ui/reports/coverage_report.html
+++ /dev/null
@@ -1,191 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/perf_insights/mappers/reduce.html">
-<link rel="import" href="/perf_insights/mappers/slice_cost.html">
-<link rel="import" href="/perf_insights/ui/reports/pi_report.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/overlay.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/time_duration_span.html">
-<link rel="import" href="/tracing/value/unit.html">
-
-<polymer-element name="pi-ui-wr-coverage-report"
- extends="pi-ui-r-pi-report"
- map-function-href="/perf_insights/mappers/weather_report_map_function.html"
- map-function-name="weatherReportMapFunction">
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
- top-controls {
- display: flex;
- flex: 0 0 auto;
- background-color: rgb(236, 236, 236);
- border-bottom: 1px solid #8e8e8e;
- padding: 4px;
- }
- #table {
- flex: 1 1 auto;
- }
- </style>
- <top-controls>
- </top-controls>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
- <script>
- 'use strict';
-
- Polymer({
- created: function() {
- this.mapResults_ = undefined;
- },
-
- get mapResults() {
- return this.mapResults_;
- },
-
- set mapResults(mapResults) {
- this.mapResults_ = mapResults;
- this.updateContents_();
- },
-
- updateContents_: function() {
- var table = this.$.table;
-
- var results = this.mapResults_;
- if (!results)
- results = new tr.r.Results();
-
- var columns = this.createColumns_();
- table.tableColumns = columns;
- table.sortColumnIndex = 2;
- table.sortDescending = true;
-
- var allCoverageInfo = [];
- results.forEach(function(result) {
- // TODO(vmpstr): Why is there no irCoverage here?
- if (!result.pairs.wr.irCoverage) {
- allCoverageInfo.push({
- title: result.pairs.canonicalUrl + ' (no coverage)',
- coverage: {
- associatedEventsCount: 'N/A',
- unassociatedEventsCount: 'N/A',
- coveredEventsCountRatio: 'N/A',
- associatedEventsCpuTimeMs: 'N/A',
- unassociatedEventsCpuTimeMs: 'N/A',
- coveredEventsCpuTimeRatio: 'N/A'
- }
- });
- return;
- }
- allCoverageInfo.push({
- title: result.pairs.canonicalUrl,
- coverage: result.pairs.wr.irCoverage
- });
- });
-
- table.tableRows = allCoverageInfo;
- table.rebuild();
- },
-
- createColumns_: function() {
- function formatMs(value) {
- var floatValue = parseFloat(value);
- if (isNaN(floatValue))
- return 'N/A';
- var span = document.createElement('tr-v-ui-time-duration-span');
- span.duration = floatValue;
- return span;
- }
-
- function formatPercent(value) {
- var floatValue = parseFloat(value);
- if (isNaN(floatValue))
- return 'N/A';
- return tr.v.Unit.byName.normalizedPercentage.format(floatValue);
- }
-
- function formatCount(value) {
- var intValue = parseInt(value);
- if (isNaN(intValue))
- return 'N/A';
- return intValue.toLocaleString();
- }
-
- var columns = [
- {
- title: 'Title',
- value: function(row) {
- return row.title;
- },
- width: '400px',
- cmp: function(a, b) {
- return a.title.localeCompare(b.title);
- }
- },
- {
- title: 'Total event count',
- value: function(row) {
- return formatCount(row.coverage.associatedEventsCount +
- row.coverage.unassociatedEventsCount);
- },
- textAlign: 'right',
- cmp: function(a, b) {
- var aTotal = a.coverage.associatedEventsCount +
- a.coverage.unassociatedEventsCount;
- var bTotal = b.coverage.associatedEventsCount +
- b.coverage.unassociatedEventsCount;
- return tr.b.compareNumericWithNaNs(aTotal, bTotal);
- }
- },
- {
- title: 'Associated event percentage',
- value: function(row) {
- return formatPercent(row.coverage.coveredEventsCountRatio);
- },
- textAlign: 'right',
- cmp: function(a, b) {
- return tr.b.compareNumericWithNaNs(
- a.coverage.coveredEventsCountRatio,
- b.coverage.coveredEventsCountRatio);
- }
- },
- {
- title: 'Total event CPU time',
- value: function(row) {
- return formatMs(row.coverage.associatedEventsCpuTimeMs +
- row.coverage.unassociatedEventsCpuTimeMs);
- },
- textAlign: 'right',
- cmp: function(a, b) {
- var aTotal = a.coverage.associatedEventsCpuTimeMs +
- a.coverage.unassociatedEventsCpuTimeMs;
- var bTotal = b.coverage.associatedEventsCpuTimeMs +
- b.coverage.unassociatedEventsCpuTimeMs;
- return tr.b.compareNumericWithNaNs(aTotal, bTotal);
- }
- },
- {
- title: 'Associated time percentage',
- value: function(row) {
- return formatPercent(row.coverage.coveredEventsCpuTimeRatio);
- },
- textAlign: 'right',
- cmp: function(a, b) {
- return tr.b.compareNumericWithNaNs(
- a.coverage.coveredEventsCpuTimeRatio,
- b.coverage.coveredEventsCpuTimeRatio);
- }
- }
- ];
- return columns;
- }
- });
- </script>
-</polymer-element>

Powered by Google App Engine
This is Rietveld 408576698