Automatic code cleanup.
PiperOrigin-RevId: 233269932
diff --git a/src/main/java/com/google/devtools/build/lib/profiler/chart/ChartVisitor.java b/src/main/java/com/google/devtools/build/lib/profiler/chart/ChartVisitor.java
index ed76bbf..e4b8be4 100644
--- a/src/main/java/com/google/devtools/build/lib/profiler/chart/ChartVisitor.java
+++ b/src/main/java/com/google/devtools/build/lib/profiler/chart/ChartVisitor.java
@@ -20,22 +20,13 @@
public interface ChartVisitor {
/**
- * Visits a {@link Chart} object before its children, i.e., rows and bars, are
- * visited.
+ * Visits a {@link Chart} object before its children, i.e., rows and bars, are visited.
*
* @param chart the {@link Chart} to visit
*/
void visit(Chart chart);
/**
- * Visits a {@link Chart} object after its children, i.e., rows and bars, are
- * visited.
- *
- * @param chart the {@link Chart} to visit
- */
- void endVisit(Chart chart);
-
- /**
* Visits a {@link ChartRow} object.
*
* @param chartRow the {@link ChartRow} to visit
@@ -62,4 +53,11 @@
* @param chartLine the {@link ChartLine} to visit
*/
void visit(ChartLine chartLine);
+
+ /**
+ * Visits a {@link Chart} object after its children, i.e., rows and bars, are visited.
+ *
+ * @param chart the {@link Chart} to visit
+ */
+ void endVisit(Chart chart);
}
diff --git a/src/main/java/com/google/devtools/build/lib/profiler/chart/HtmlChartVisitor.java b/src/main/java/com/google/devtools/build/lib/profiler/chart/HtmlChartVisitor.java
index b64341a..861baa2 100644
--- a/src/main/java/com/google/devtools/build/lib/profiler/chart/HtmlChartVisitor.java
+++ b/src/main/java/com/google/devtools/build/lib/profiler/chart/HtmlChartVisitor.java
@@ -80,20 +80,12 @@
heading("Tasks", 2);
out.println("<p>To get more information about a task point the mouse at one of the bars.</p>");
- out.printf("<div style='position:relative; height: %dpx; margin: %dpx'>\n",
+ out.printf(
+ "<div style='position:relative; height: %dpx; margin: %dpx'>\n",
chart.getRowCount() * ROW_HEIGHT, H_OFFSET + 10);
}
@Override
- public void endVisit(Chart chart) {
- printTimeAxis(chart);
- out.println("</div>");
-
- heading("Legend", 2);
- printLegend(chart.getSortedTypes());
-}
-
- @Override
public void visit(ChartColumn column) {
int width = scale(column.getWidth());
if (width == 0) {
@@ -105,7 +97,6 @@
box(left, 0, width, height, style, column.getLabel(), 10);
}
-
@Override
public void visit(ChartRow slot) {
String style = slot.getIndex() % 2 == 0 ? "shade-even" : "shade-odd";
@@ -144,9 +135,16 @@
}
}
- /**
- * Converts the given value from the bar of the chart to pixels.
- */
+ @Override
+ public void endVisit(Chart chart) {
+ printTimeAxis(chart);
+ out.println("</div>");
+
+ heading("Legend", 2);
+ printLegend(chart.getSortedTypes());
+ }
+
+ /** Converts the given value from the bar of the chart to pixels. */
private int scale(long value) {
return (int) (value / (1000000000L / pixelsPerSecond));
}