2016-06-01 22:12:50 -04:00
|
|
|
<!--
|
|
|
|
- Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
- or more contributor license agreements. See the NOTICE file
|
|
|
|
- distributed with this work for additional information
|
|
|
|
- regarding copyright ownership. The ASF licenses this file
|
|
|
|
- to you under the Apache License, Version 2.0 (the
|
|
|
|
- "License"); you may not use this file except in compliance
|
|
|
|
- with the License. You may obtain a copy of the License at
|
|
|
|
-
|
|
|
|
- http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
-
|
|
|
|
- Unless required by applicable law or agreed to in writing, software
|
|
|
|
- distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
- See the License for the specific language governing permissions and
|
|
|
|
- limitations under the License.
|
|
|
|
-->
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Apache HBase Flaky Dashboard</title>
|
|
|
|
<style type="text/css">
|
|
|
|
table {
|
|
|
|
table-layout: fixed;
|
|
|
|
}
|
|
|
|
th {
|
|
|
|
font-size: 15px;
|
|
|
|
}
|
|
|
|
td {
|
|
|
|
font-size: 18px;
|
|
|
|
vertical-align: text-top;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
.show_hide_button {
|
|
|
|
font-size: 100%;
|
|
|
|
padding: .5em 1em;
|
|
|
|
border: 0 rgba(0,0,0,0);
|
|
|
|
border-radius: 10px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2017-05-18 19:53:28 -04:00
|
|
|
<script src="http://d3js.org/d3.v3.min.js"></script>
|
|
|
|
<script>
|
|
|
|
var width = 300;
|
|
|
|
var height = 25;
|
|
|
|
var x = d3.scale.linear().range([0, width]);
|
|
|
|
|
|
|
|
function csvToArray(csv) {
|
|
|
|
if (csv.length == 0)
|
|
|
|
return [];
|
|
|
|
splits = csv.split(",");
|
|
|
|
ret = [];
|
|
|
|
for (i = 0; i < splits.length; i++) {
|
|
|
|
ret.push(parseInt(splits[i]));
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
function sortNumber(a,b) {
|
|
|
|
return a - b;
|
|
|
|
}
|
|
|
|
|
|
|
|
function sparkline(elemId, failed, timeout, hanging, success, domain_min, domain_max) {
|
|
|
|
failed = csvToArray(failed);
|
|
|
|
timeout = csvToArray(timeout);
|
|
|
|
hanging = csvToArray(hanging);
|
|
|
|
success = csvToArray(success);
|
|
|
|
all = failed.concat(timeout).concat(hanging).concat(success);
|
|
|
|
all.sort(sortNumber);
|
|
|
|
x.domain([domain_min, domain_max + 1]);
|
|
|
|
rect_width = x(domain_min + 1) - x(domain_min) - 1;
|
|
|
|
svg = d3.select("#" + elemId).append('svg').attr('width', width).attr('height', height);
|
|
|
|
svg.selectAll("dot")
|
|
|
|
.data(all)
|
|
|
|
.enter()
|
|
|
|
.append("svg:rect")
|
|
|
|
.attr("x", function(d) { return x(d); })
|
|
|
|
.attr("y", 3)
|
|
|
|
.attr("height", height- 6)
|
|
|
|
.attr("width", rect_width)
|
|
|
|
.attr("fill", function(d) {
|
|
|
|
if (success.includes(d)) return "green";
|
|
|
|
else if (timeout.includes(d)) return "gold";
|
|
|
|
else if (hanging.includes(d)) return "blue";
|
|
|
|
else if (failed.includes(d)) return "red";
|
|
|
|
else return "black";
|
|
|
|
})
|
|
|
|
.append('svg:title')
|
|
|
|
.text(function(d) { return d; });
|
|
|
|
}
|
|
|
|
</script>
|
2016-06-01 22:12:50 -04:00
|
|
|
<p>
|
|
|
|
<img style="vertical-align:middle; display:inline-block;" height="80px"
|
|
|
|
src="https://hbase.apache.org/images/hbase_logo_with_orca_large.png">
|
|
|
|
|
|
|
|
<span style="font-size:50px; vertical-align:middle; display:inline-block;">
|
|
|
|
Apache HBase Flaky Tests Dashboard
|
|
|
|
</span>
|
|
|
|
</p>
|
2016-08-17 03:47:16 -04:00
|
|
|
<span>Last updated: <b>{{datetime}}</b></span><br>
|
|
|
|
<span>Count of flaky tests (cumulated from all jobs):
|
|
|
|
<b>{{bad_tests_count}}</b></span><br>
|
2016-06-01 22:12:50 -04:00
|
|
|
<br><br>
|
2016-08-17 03:47:16 -04:00
|
|
|
<span style="font-size:20px;"><b>List of Jobs</b></span><br>
|
|
|
|
<br>
|
|
|
|
{% for url in results %}
|
2017-05-12 05:25:19 -04:00
|
|
|
<a href="#job_{{ loop.index }}">{{ url |e }}</a>
|
2016-08-17 03:47:16 -04:00
|
|
|
<br>
|
|
|
|
{% endfor %}
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<span style="font-size:20px;"><b>Results</b></span><br>
|
|
|
|
<br>
|
2016-06-01 22:12:50 -04:00
|
|
|
{% for url in results %}
|
|
|
|
{% set result = results[url] %}
|
2017-05-12 05:25:19 -04:00
|
|
|
{% set url_counter = loop.index %}
|
2016-06-01 22:12:50 -04:00
|
|
|
{# Dedup ids since test names may duplicate across urls #}
|
2017-05-12 05:25:19 -04:00
|
|
|
<span id="job_{{ url_counter }}" style="font-weight:bold;">
|
2016-08-17 03:47:16 -04:00
|
|
|
{{ url |e }}<br>
|
|
|
|
<a href="{{ url |e }}">
|
|
|
|
Go to <img height="16px" src="https://jenkins.io/sites/default/files/jenkins_favicon.ico">
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a href="#">Go to top</a>
|
|
|
|
</span>
|
2016-06-01 22:12:50 -04:00
|
|
|
<br/><br/>
|
2017-05-18 19:53:28 -04:00
|
|
|
Legend : green: success, red: failed, yellow: timeout, blue: hanging
|
2016-06-01 22:12:50 -04:00
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th width="400px">Test Name</th>
|
|
|
|
<th width="150px">Flakyness</th>
|
|
|
|
<th width="200px">Failed/Timeout/Hanging</th>
|
2017-05-18 19:53:28 -04:00
|
|
|
<th width="300px">Trends</th>
|
2016-06-01 22:12:50 -04:00
|
|
|
<th>Run Ids</th>
|
|
|
|
</tr>
|
|
|
|
{% for test in result %}
|
|
|
|
{% set all = result[test]['all'] %}
|
|
|
|
{% set failed = result[test]['failed'] %}
|
|
|
|
{% set timeout = result[test]['timeout'] %}
|
|
|
|
{% set hanging = result[test]['hanging'] %}
|
2016-09-27 14:46:20 -04:00
|
|
|
{% set success = result[test]['success'] %}
|
2016-06-01 22:12:50 -04:00
|
|
|
<tr>
|
|
|
|
<td>{{ test |e }}</td>
|
|
|
|
{% set flakyness =
|
|
|
|
(failed|length + hanging|length) * 100 / all|length %}
|
|
|
|
{% if flakyness == 100 %}
|
|
|
|
<td align="middle" style="background-color:#FF9999;">
|
|
|
|
{% else %}
|
|
|
|
<td align="middle">
|
|
|
|
{% endif %}
|
|
|
|
{{ "{:.1f}% ({} / {})".format(
|
|
|
|
flakyness, failed|length + hanging|length, all|length) }}
|
|
|
|
</td>
|
|
|
|
<td align="middle">
|
|
|
|
{{ failed|length }} / {{ timeout|length }} / {{ hanging|length }}
|
|
|
|
</td>
|
2017-05-18 22:10:19 -04:00
|
|
|
{% set sparkline_id = "sparkline_" ~ test ~ "_" ~ url_counter %}
|
2017-05-18 19:53:28 -04:00
|
|
|
<td id="{{ sparkline_id }}" align="middle">
|
|
|
|
</td>
|
|
|
|
<script>sparkline("{{ sparkline_id }}", "{{ failed|join(',') }}", "{{ timeout|join(',') }}",
|
|
|
|
"{{ hanging|join(',') }}", "{{ success|join(',') }}", {{ build_ids[url][0] }},
|
|
|
|
{{ build_ids[url][-1] }});</script>
|
2016-06-01 22:12:50 -04:00
|
|
|
<td>
|
2017-05-12 05:25:19 -04:00
|
|
|
{% set id = "details_" ~ test ~ "_" ~ url_counter %}
|
2016-06-01 22:12:50 -04:00
|
|
|
<button class="show_hide_button" onclick="toggle('{{ id }}')">
|
|
|
|
show/hide</button>
|
|
|
|
<br/>
|
|
|
|
<div id="{{ id }}"
|
2017-05-18 19:53:28 -04:00
|
|
|
style="display: none; width:300px; white-space: normal">
|
2016-06-01 22:12:50 -04:00
|
|
|
{% macro print_run_ids(url, run_ids) -%}
|
|
|
|
{% for i in run_ids %}
|
|
|
|
<a href="{{ url }}/{{ i }}">{{ i }}</a>
|
|
|
|
{% endfor %}
|
|
|
|
{%- endmacro %}
|
|
|
|
Failed : {{ print_run_ids(url, failed) }}<br/>
|
|
|
|
Timed Out : {{ print_run_ids(url, timeout) }}<br/>
|
|
|
|
Hanging : {{ print_run_ids(url, hanging) }}<br/>
|
|
|
|
Succeeded : {{ print_run_ids(url, success) }}
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
<br><br><br>
|
|
|
|
{% endfor %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
function toggle(id) {
|
|
|
|
if (document.getElementById(id).style["display"] == "none") {
|
|
|
|
document.getElementById(id).style["display"] = "block";
|
|
|
|
} else {
|
|
|
|
document.getElementById(id).style["display"] = "none";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|