Commit 04bd0a15 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[tools] Fix typo in map-processor.html

Drive-by-fix: improve table layout.

Change-Id: If566e93b7f96d402a8f21715b7e6d3132817a20b
No-Try: true
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074642Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66474}
parent 3a04913e
...@@ -113,6 +113,17 @@ h1, h2, h3, section { ...@@ -113,6 +113,17 @@ h1, h2, h3, section {
max-height: 200px; max-height: 200px;
overflow-y: scroll; overflow-y: scroll;
} }
#stats .transitionType {
text-align: right;
}
#stats .transitionType tr td:nth-child(2) {
text-align: left;
}
#stats .transitionType tr:nth-child(1) td {
border-bottom: 1px black dotted;
}
#timeline { #timeline {
position: relative; position: relative;
height: 300px; height: 300px;
...@@ -436,9 +447,9 @@ function td(textOrNode) { ...@@ -436,9 +447,9 @@ function td(textOrNode) {
return node; return node;
} }
function tr() { function tr() {
let node = document.createElement("tr"); return document.createElement("tr");
return node;
} }
function define(prototype, name, fn) { function define(prototype, name, fn) {
...@@ -1103,7 +1114,7 @@ class StatsView { ...@@ -1103,7 +1114,7 @@ class StatsView {
]; ];
let text = ""; let text = "";
let tableNode = table(); let tableNode = table("transitionType");
let name, filter; let name, filter;
let total = this.timeline.size(); let total = this.timeline.size();
pairs.forEach(([name, color, filter]) => { pairs.forEach(([name, color, filter]) => {
...@@ -1120,7 +1131,7 @@ class StatsView { ...@@ -1120,7 +1131,7 @@ class StatsView {
let count = this.timeline.count(filter); let count = this.timeline.count(filter);
row.appendChild(td(count)); row.appendChild(td(count));
let percent = Math.round(count / total * 1000) / 10; let percent = Math.round(count / total * 1000) / 10;
row.appendChild(td(percent + "%")); row.appendChild(td(percent.toFixed(1) + "%"));
tableNode.appendChild(row); tableNode.appendChild(row);
}); });
this.node.appendChild(tableNode); this.node.appendChild(tableNode);
...@@ -1204,7 +1215,7 @@ function transitionTypeToColor(type) { ...@@ -1204,7 +1215,7 @@ function transitionTypeToColor(type) {
<h2>Instructions</h2> <h2>Instructions</h2>
<section> <section>
<p>Visualize Map trees that have been gathere using <code>--trace-maps</code>.</p> <p>Visualize Map trees that have been gathered using <code>--trace-maps</code>.</p>
</section> </section>
<div id="tooltip"> <div id="tooltip">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment