Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions codespeed/urls.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# -*- coding: utf-8 -*-
from django.urls import re_path
from django.views.generic import TemplateView

from codespeed import views
from codespeed.feeds import LatestEntries, LatestSignificantEntries

urlpatterns = [
re_path(r'^$', views.HomeView.as_view(), name='home'),
re_path(r'^about/$',
TemplateView.as_view(template_name='about.html'), name='about'),
re_path(r'^about/$', views.about, name='about'),
# RSS for reports
re_path(r'^feeds/latest/$', LatestEntries(), name='latest-results'),
re_path(r'^feeds/latest_significant/$', LatestSignificantEntries(),
Expand Down
22 changes: 21 additions & 1 deletion codespeed/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

import json
import logging
import os
import subprocess

import django
from django.conf import settings
Expand Down Expand Up @@ -288,7 +290,7 @@ def comparison(request):
enviros = Environment.objects.all()
if not enviros:
return no_environment_error(request)
checkedenviros = get_default_environment(enviros, data)
checkedenviros = get_default_environment(enviros, data, multi=True)

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


def _get_current_commit():
try:
repo_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
return subprocess.check_output(
['git', 'rev-parse', 'HEAD'],
cwd=repo_root,
stderr=subprocess.DEVNULL,
).decode().strip()
except Exception:
return None

_CURRENT_COMMIT = _get_current_commit()


def about(request):
return render(request, 'about.html', {'commit': _CURRENT_COMMIT})

return response
15 changes: 11 additions & 4 deletions speed_pypy/templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,27 @@
<div id="about" class="about_content clearfix">
<h3>About this site</h3>
<p>We have nightly benchmark runs of PyPy, together with CPython data for
comparison. The current benchmarks have run since 2016 on a dedicated machine
comparison. The benchmarks have run since 2016 on a dedicated machine
named <b>benchmarker</b>. Previously, we had other machines (<b>tannit</b> and
briefly <b>speed-python</b>). The <b>benchmarker</b> machine is generously
donated by <a href="https://baroquesoftware.com">Baroque Software</a>. The
specs are:</p>
<ul><li>Processor: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz</li>
<ul><li>Processor: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz with turbo enabled</li>
<li>RAM: 64GB Micron DDR4 2400 MHz</li>
<li>Disk: 4TB TOSHIBA MG04ACA4</li>
</ul>
<p>Benchmarks are also run on <b>benchmarker2</b>:</p>
<ul><li>Processor: AMD Ryzen 5 3600 pinned to 3.60GHz, turnbo disabled</li>
<li>RAM: 64GB</li>
<li>Benchmarking pinned with cpuset partitions to CPUs3,4,5 with SMT
(hyper-threading) disabled </li>
</ul>

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

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

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