77:c4a6cb0ec67c
Anton Shestakov <av6@dwimlabs.net>, Thu, 04 Aug 2016 14:34:15 +0800
bench: add --marks command line argument

previous change 58:1fc22f551483

templates/fancy.html

Permissions: -rw-r--r--

Other formats: Feeds:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>hgperfcheck{% if changesets %} (rev {{ changesets[0]['rev'] }} and earlier){% end %}</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css" integrity="sha384-s08NNYG/Em4Lx16SEICBFXiHg6V8fTzhXqCaWFRAFSPz+jU2iL7/wQzNU/ZX42nA" crossorigin="anonymous">
<style type="text/css">
* {
font-family: monospace;
}
.c3-tooltip .branch {
color: darkblue;
}
.c3-tooltip .tags {
color: darkred;
}
.c3-tooltip .merge {
color: darkgreen;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js" integrity="sha384-N8EP0Yml0jN7e0DcXlZ6rt+iqKU9Ck6f1ZQ+j2puxatnBq4k9E8Q6vqBcY34LNbn" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.js" integrity="sha384-GJLMTBltF544BVD/V1zGiUps532DxiVy7krDle4KbODv534Z2laa9lSIl7GlXgXs" crossorigin="anonymous"></script>
</head>
<body>
<header>
<p>
<a href="{{ setrev() }}">back to tip</a>
{% set prevrev = changesets[0]['rev'] + 120 if changesets else None %}
{% if prevrev %}<a href="{{ setrev(prevrev) }}">prev page</a>{% end %}
{% set nextrev = changesets[-1]['rev'] - 1 if changesets else None %}
{% if nextrev > -1 %}<a href="{{ setrev(nextrev) }}">next page</a>{% end %}
<span style="color: #777;">
hover things for a tooltip; red means slow, green means fast; first
color and time means without .hg/cache, second means with .hg/cache.
</span>
</p>
<p>
timings:
{% for mark, desc in marks.items() %}
-<a href="{{ setmarks(remove=mark) }}" title="{{ desc }}">{{ mark }}</a>
{% end %}
{% for mark, desc in moremarks.items() %}
+<a href="{{ setmarks(add=mark) }}" title="{{ desc }}">{{ mark }}</a>
{% end %}
*<a href="{{ setmarks() }}">all</a>
</p>
</header>
<div id="chart"></div>
<footer>
<p>
<a href="{{ setrev() }}">back to tip</a>
{% if prevrev %}<a href="{{ setrev(prevrev) }}">prev page</a>{% end %}
{% if nextrev > -1 %}<a href="{{ setrev(nextrev) }}">next page</a>{% end %}
</p>
</footer>
<script type="application/json" id="data">{% raw json_encode(data) %}</script>
<script>
var data = JSON.parse(document.getElementById('data').firstChild.nodeValue);
var chart = c3.generate({
bindto: '#chart',
size: {height: 500},
tooltip: {format: {title: function(x) {
var c = data.csetmap[-x];
return c.rev + ':' + c.shortnode
+ ' <span class="branch">' + c.branch + '</span>'
+ ' <span class="tags">' + c.tags.join(', ') + '</span>'
+ ' <span class="merge">' + c.merge + '</span> '
+ c.firstline;
}}},
axis: {x: {tick: {format: function(x) { return -x; }}}},
data: data
});
</script>
</body>
</html>