Skip to content

Commit 3ab4b9c

Browse files
committed
add a commit to the about page and mention benchmarker2
1 parent c3060d2 commit 3ab4b9c

3 files changed

Lines changed: 33 additions & 8 deletions

File tree

codespeed/urls.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# -*- coding: utf-8 -*-
22
from django.urls import re_path
3-
from django.views.generic import TemplateView
43

54
from codespeed import views
65
from codespeed.feeds import LatestEntries, LatestSignificantEntries
76

87
urlpatterns = [
98
re_path(r'^$', views.HomeView.as_view(), name='home'),
10-
re_path(r'^about/$',
11-
TemplateView.as_view(template_name='about.html'), name='about'),
9+
re_path(r'^about/$', views.about, name='about'),
1210
# RSS for reports
1311
re_path(r'^feeds/latest/$', LatestEntries(), name='latest-results'),
1412
re_path(r'^feeds/latest_significant/$', LatestSignificantEntries(),

codespeed/views.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
import json
55
import logging
6+
import os
7+
import subprocess
68

79
import django
810
from django.conf import settings
@@ -288,7 +290,7 @@ def comparison(request):
288290
enviros = Environment.objects.all()
289291
if not enviros:
290292
return no_environment_error(request)
291-
checkedenviros = get_default_environment(enviros, data)
293+
checkedenviros = get_default_environment(enviros, data, multi=True)
292294

293295
if not len(Project.objects.filter(track=True)):
294296
return no_default_project_error(request)
@@ -1118,4 +1120,22 @@ def makeimage(request):
11181120
response['Content-Length'] = len(image_data)
11191121
response['Content-Disposition'] = 'attachment; filename=image.png'
11201122

1123+
1124+
def _get_current_commit():
1125+
try:
1126+
repo_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1127+
return subprocess.check_output(
1128+
['git', 'rev-parse', 'HEAD'],
1129+
cwd=repo_root,
1130+
stderr=subprocess.DEVNULL,
1131+
).decode().strip()
1132+
except Exception:
1133+
return None
1134+
1135+
_CURRENT_COMMIT = _get_current_commit()
1136+
1137+
1138+
def about(request):
1139+
return render(request, 'about.html', {'commit': _CURRENT_COMMIT})
1140+
11211141
return response

speed_pypy/templates/about.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,27 @@
66
<div id="about" class="about_content clearfix">
77
<h3>About this site</h3>
88
<p>We have nightly benchmark runs of PyPy, together with CPython data for
9-
comparison. The current benchmarks have run since 2016 on a dedicated machine
9+
comparison. The benchmarks have run since 2016 on a dedicated machine
1010
named <b>benchmarker</b>. Previously, we had other machines (<b>tannit</b> and
1111
briefly <b>speed-python</b>). The <b>benchmarker</b> machine is generously
1212
donated by <a href="https://baroquesoftware.com">Baroque Software</a>. The
1313
specs are:</p>
14-
<ul><li>Processor: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz</li>
14+
<ul><li>Processor: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz with turbo enabled</li>
1515
<li>RAM: 64GB Micron DDR4 2400 MHz</li>
1616
<li>Disk: 4TB TOSHIBA MG04ACA4</li>
1717
</ul>
18+
<p>Benchmarks are also run on <b>benchmarker2</b>:</p>
19+
<ul><li>Processor: AMD Ryzen 5 3600 pinned to 3.60GHz, turnbo disabled</li>
20+
<li>RAM: 64GB</li>
21+
<li>Benchmarking pinned with cpuset partitions to CPUs3,4,5 with SMT
22+
(hyper-threading) disabled </li>
23+
</ul>
1824

1925
<h3>About the benchmarks</h3>
2026
<p>The benchmark code can be found <a
2127
href="https://foss.heptapod.net/pypy/benchmarks">here</a>.</p>
2228
<p>This is a benchmark suite based on Unladen Swallow, adapted for PyPy and
23-
runs on Python2 and Python3. Also see the <a href="https://speed.python.org">
29+
runs on Python2 and Python3.<br>Also see the <a href="https://speed.python.org">
2430
speed.python.org</a> site.</p>
2531

2632
<h3>About PyPy</h3>
@@ -34,7 +40,8 @@ <h3>About Codespeed</h3>
3440
to monitor and analyze the performance of your code.
3541
<p>The source code of this website can be found on the
3642
<a href="https://github.com/python/codespeed/tree/speed.pypy.org"><code>PyPy</code>
37-
branch</a> of the Python fork of codespeed.</p>
43+
branch</a> of the Python fork of codespeed{% if commit %},
44+
currently at commit <a href="https://github.com/python/codespeed/commit/{{ commit }}"><code>{{ commit|slice:":12" }}</code></a>{% endif %}.</p>
3845

3946
<h3>Contact</h3>
4047
<p>For problems or suggestions about this website, please file an issue in the

0 commit comments

Comments
 (0)