aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/benchmark
diff options
context:
space:
mode:
authorGravatar Yue Gan <yueg@google.com>2017-03-27 10:10:44 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2017-03-27 11:38:42 +0000
commit99fe484bd1348a1a3e180ce6d26703de2556b83c (patch)
tree7c35d9825d06166b50c7c4fc4be21a4c9c2e2493 /src/tools/benchmark
parent7d3a0880a8129dfdb987d805af7475b2b035bdd1 (diff)
Separate charts for Java target and Cpp target, or the page is too long.
-- PiperOrigin-RevId: 151302544 MOS_MIGRATED_REVID=151302544
Diffstat (limited to 'src/tools/benchmark')
-rw-r--r--src/tools/benchmark/webapp/draw_chart.js16
-rw-r--r--src/tools/benchmark/webapp/index.html35
2 files changed, 50 insertions, 1 deletions
diff --git a/src/tools/benchmark/webapp/draw_chart.js b/src/tools/benchmark/webapp/draw_chart.js
index d179e3bfeb..222aff8434 100644
--- a/src/tools/benchmark/webapp/draw_chart.js
+++ b/src/tools/benchmark/webapp/draw_chart.js
@@ -272,3 +272,19 @@ function hideOrShow(dashboard, chart, columns, tableData, options) {
view.setColumns(columns);
dashboard.draw(view);
}
+
+/** @type {!Array<string>} */
+const chartDivList = ['java', 'cpp'];
+/**
+ * Only show the specific div
+ * @param {!string} divId the id of the div that needs to be shown
+ */
+function showChartDiv(divId) {
+ for (let id of chartDivList) {
+ if (id === divId) {
+ $('#' + id).show();
+ } else {
+ $('#' + id).hide();
+ }
+ }
+}
diff --git a/src/tools/benchmark/webapp/index.html b/src/tools/benchmark/webapp/index.html
index 19cd713f8a..5a1318f553 100644
--- a/src/tools/benchmark/webapp/index.html
+++ b/src/tools/benchmark/webapp/index.html
@@ -4,6 +4,16 @@
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="draw_chart.js"></script>
+ <style type="text/css">
+ span {
+ cursor: pointer;
+ }
+ #bar {
+ text-align:center;
+ font-weight:bold;
+ font-size:30px;
+ }
+ </style>
<title>Continuous Build Performance Benchmark</title>
</head>
<body>
@@ -14,6 +24,29 @@
<p>This benchmark is generated by the code in <a href="https://github.com/bazelbuild/bazel/tree/master/src/tools/benchmark">bazel/src/tools/benchmark</a>. You can also try it locally.</p>
<p>Our <a href="http://ci.bazel.io">CI system</a> automatically builds Bazel at each Git commit. The performance of each version is then assessed by building various kinds of <a href="https://github.com/bazelbuild/bazel/tree/master/src/tools/benchmark/java/com/google/devtools/build/benchmark/codegenerator">generated Java code</a> (e.g. Java libraries with few files, with many files, with many parallel deps, with a long chain of deps). The time it took to build each kind of code is measured and used to generate these charts.</p>
</div>
- <div id="content"></div>
+ <div id="bar">
+ <span onclick="showChartDiv('java');">Java</span> | <span onclick="showChartDiv('cpp');">C++</span></div>
+ <div id="content">
+ <div id="java">
+ <div id="target0" style="width: 100%; height: 600px"></div>
+ <div id="control0" style="width: 100%; height: 100px"></div>
+ <div id="target1" style="width: 100%; height: 600px"></div>
+ <div id="control1" style="width: 100%; height: 100px"></div>
+ <div id="target2" style="width: 100%; height: 600px"></div>
+ <div id="control2" style="width: 100%; height: 100px"></div>
+ <div id="target3" style="width: 100%; height: 600px"></div>
+ <div id="control3" style="width: 100%; height: 100px"></div>
+ </div>
+ <div id="cpp">
+ <div id="target4" style="width: 100%; height: 600px"></div>
+ <div id="control4" style="width: 100%; height: 100px"></div>
+ <div id="target5" style="width: 100%; height: 600px"></div>
+ <div id="control5" style="width: 100%; height: 100px"></div>
+ <div id="target6" style="width: 100%; height: 600px"></div>
+ <div id="control6" style="width: 100%; height: 100px"></div>
+ <div id="target7" style="width: 100%; height: 600px"></div>
+ <div id="control7" style="width: 100%; height: 100px"></div>
+ </div>
+ </div>
</body>
</html> \ No newline at end of file