73:0ff094b4fb4a
Anton Shestakov <av6@dwimlabs.net>, Thu, 04 Aug 2016 10:54:57 +0800
viewer: if we want to maybe support Python 3, do the PEP 3113 thing

next change 84:75dafcb54f2c
previous change 56:2bc880fe68a4

templates/results.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>
<style type="text/css">
* {
font-family: monospace;
}
table {
border-spacing: 0;
}
tbody tr:hover {
background-color: silver;
}
td {
white-space: nowrap;
padding: 1px 5px;
}
td.hint {
width: 100%;
position: relative;
}
td.hint div {
position: absolute;
text-overflow: ellipsis;
overflow: hidden;
top: 1px;
left: 5px;
right: 5px;
}
{% for rgb, cc in colormap.items() %}{#
#}.{{ cc }} { background: rgb({{ '{},{},{}'.format(*rgb) }}); }
{% end %}
</style>
</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>
{% if local %}
local colors (<a href="{{ setlocal(None) }}">switch to global colors</a>)
{% else %}
global colors (<a href="{{ setlocal(1) }}">switch to local colors</a>)
{% end %}
</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>
*<a href="{{ setmarks('') }}">none</a>
</p>
</header>
<table>
<thead>
<tr>
<td>rev</td>
<td>node</td>
<td title="merge">M</td>
<td>branch</td>
<td>tags</td>
<td>user</td>
<td>desc</td>
{% for mark, desc in marks.items() %}
<td title="{{ desc }}">{{ mark }}</td>
{% end %}
</tr>
</thead>
<tbody>
{% for cset in changesets %}
<tr>
<td>{{ cset['rev'] }}</td>
<td><a href="https://selenic.com/hg/rev/{{ cset['node'] }}">{{ cset['node'][:12] }}</a></td>
<td>{{ 'M' if len(cset['parents']) > 1 else '' }}</td>
<td>{{ cset['branch'] }}</td>
<td>{{ ', '.join(cset['tags']) }}</td>
<td title="{{ showuser(cset['user']) }}">{{ showuser(cset['user'], short=True) }}</td>
<td class="hint"><div title="{{ cset['desc'] }}">{{ cset['desc'].partition('\n')[0] }}</div></td>
{% for mark in marks %}{#
#}{% set result = results.get(cset['node'], {}) %}{#
#}{% set v1, c1, v2, c2 = result.get(mark, (None, None, None, None)) %}{#
#}<td>{#
#}<span{% if c1 is not None %} class="{{ colormap[c1] }}"{% end %}>&nbsp;</span>{#
#}<span{% if c2 is not None %} class="{{ colormap[c2] }}"{% end %}>&nbsp;</span>{#
#}<span title="{{ '{:.5f}s without .hg/cache'.format(v1) if v1 is not None else '(no data)' }}">{#
#}{{ '{:.2f}'.format(v1) if v1 is not None else '-' }}{#
#}</span>{#
#}/{#
#}<span title="{{ '{:.5f}s with .hg/cache'.format(v2) if v2 is not None else '(no data)' }}">{#
#}{{ '{:.2f}'.format(v2) if v2 is not None else '-' }}{#
#}</span>{#
#}</td>
{% end %}{#
#}</tr>
{% end %}
</tbody>
</table>
<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>
</body>
</html>