diff --git a/codespeed/commits/mercurial.py b/codespeed/commits/mercurial.py index de0c63e8..0f4f5938 100644 --- a/codespeed/commits/mercurial.py +++ b/codespeed/commits/mercurial.py @@ -63,7 +63,7 @@ def getlogs(endrev, startrev): if p.returncode != 0: raise CommitLogError(str(stderr)) else: - stdout = stdout.rstrip('\n') # Remove last newline + stdout = stdout.decode('utf-8').rstrip('\n') # Remove last newline logs = [] for log in stdout.split("=newlog=\n"): elements = [] diff --git a/codespeed/models.py b/codespeed/models.py index f673d43c..82e55444 100644 --- a/codespeed/models.py +++ b/codespeed/models.py @@ -475,7 +475,7 @@ def get_changes_table(self, trend_depth=10, force_save=False): val_max = "-" # Calculate percentage change relative to previous result - result = resobj.value + result = max(resobj.value, 0) change = "-" if len(change_list): c = change_list.filter(benchmark=bench) diff --git a/codespeed/settings.py b/codespeed/settings.py index 42a38678..70390e0e 100644 --- a/codespeed/settings.py +++ b/codespeed/settings.py @@ -2,7 +2,7 @@ """Default settings for Codespeed""" ## General default options ## -WEBSITE_NAME = "MySpeedSite" # This name will be used in the reports RSS feed +WEBSITE_NAME = "PyPy's Speed Center" # This name will be used in the reports RSS feed DEF_ENVIRONMENT = None # Name of the environment which should be selected as default diff --git a/codespeed/static/css/main.css b/codespeed/static/css/main.css index 727c6850..5a39e602 100644 --- a/codespeed/static/css/main.css +++ b/codespeed/static/css/main.css @@ -119,7 +119,7 @@ div#presentation div.menubox { } div#presentation div.menubox:hover { border: 5px solid #FFCE9C; } -div#presentation p { height: 5em; padding-left: 120px; } +div#presentation div.menubox p { height: 5em; padding-left: 120px; } div#presentation div#changes p { background: url(../images/changes.png) no-repeat; diff --git a/codespeed/static/images/favicon.ico b/codespeed/static/images/favicon.ico new file mode 100644 index 00000000..c79bb6de Binary files /dev/null and b/codespeed/static/images/favicon.ico differ diff --git a/codespeed/static/js/jqplot/jqplot.pointLabels.min.js b/codespeed/static/js/jqplot/jqplot.pointLabels.min.js index 558456b3..91d91634 100644 --- a/codespeed/static/js/jqplot/jqplot.pointLabels.min.js +++ b/codespeed/static/js/jqplot/jqplot.pointLabels.min.js @@ -1 +1,2 @@ -!function(t){t.jqplot.PointLabels=function(e){this.show=t.jqplot.config.enablePlugins,this.location="n",this.labelsFromSeries=!1,this.seriesLabelIndex=null,this.labels=[],this._labels=[],this.stackedValue=!1,this.ypadding=6,this.xpadding=6,this.escapeHTML=!0,this.edgeTolerance=-5,this.formatter=t.jqplot.DefaultTickFormatter,this.formatString="",this.hideZeros=!1,this._elems=[],t.extend(!0,this,e)};var e={nw:0,n:1,ne:2,e:3,se:4,s:5,sw:6,w:7},s=["se","s","sw","w","nw","n","ne","e"];t.jqplot.PointLabels.init=function(e,s,i,a,l){var r=t.extend(!0,{},i,a);r.pointLabels=r.pointLabels||{},this.renderer.constructor!==t.jqplot.BarRenderer||"horizontal"!==this.barDirection||r.pointLabels.location||(r.pointLabels.location="e"),this.plugins.pointLabels=new t.jqplot.PointLabels(r.pointLabels),this.plugins.pointLabels.setLabels.call(this)},t.jqplot.PointLabels.prototype.setLabels=function(){var e,s=this.plugins.pointLabels;if(e=null!=s.seriesLabelIndex?s.seriesLabelIndex:this.renderer.constructor===t.jqplot.BarRenderer&&"horizontal"===this.barDirection?this._plotData[0].length<3?0:this._plotData[0].length-1:0===this._plotData.length?0:this._plotData[0].length-1,s._labels=[],0===s.labels.length||s.labelsFromSeries)if(s.stackedValue){if(this._plotData.length&&this._plotData[0].length)for(var i=0;ij||L+m>q)&&h.remove(),h=null,p=null}}}},t.jqplot.postSeriesInitHooks.push(t.jqplot.PointLabels.init),t.jqplot.postDrawSeriesHooks.push(t.jqplot.PointLabels.draw)}(jQuery); \ No newline at end of file +!function(t){t.jqplot.PointLabels=function(e){this.show=t.jqplot.config.enablePlugins,this.location="n",this.labelsFromSeries=!1,this.seriesLabelIndex=null,this.labels=[],this._labels=[],this.stackedValue=!1,this.ypadding=6,this.xpadding=6,this.escapeHTML=!0,this.edgeTolerance=-5,this.formatter=t.jqplot.DefaultTickFormatter,this.formatString="",this.hideZeros=!1,this._elems=[],t.extend(!0,this,e)};var e={nw:0,n:1,ne:2,e:3,se:4,s:5,sw:6,w:7},s=["se","s","sw","w","nw","n","ne","e"];t.jqplot.PointLabels.init=function(e,s,i,a,l){var r=t.extend(!0,{},i,a);r.pointLabels=r.pointLabels||{},this.renderer.constructor!==t.jqplot.BarRenderer||"horizontal"!==this.barDirection||r.pointLabels.location||(r.pointLabels.location="e"),this.plugins.pointLabels=new t.jqplot.PointLabels(r.pointLabels),this.plugins.pointLabels.setLabels.call(this)},t.jqplot.PointLabels.prototype.setLabels=function(){var e,s=this.plugins.pointLabels;if(e=null!=s.seriesLabelIndex?s.seriesLabelIndex:this.renderer.constructor===t.jqplot.BarRenderer&&"horizontal"===this.barDirection?this._plotData[0].length<3?0:this._plotData[0].length-1:0===this._plotData.length?0:this._plotData[0].length-1,s._labels=[],0===s.labels.length||s.labelsFromSeries)if(s.stackedValue){if(this._plotData.length&&this._plotData[0].length)for(var i=0;ij||L+m>q)&&h.remove(),h=null,p=null}}}},t.jqplot.postSeriesInitHooks.push(t.jqplot.PointLabels.init),t.jqplot.postDrawSeriesHooks.push(t.jqplot.PointLabels.draw)}(jQuery); + diff --git a/codespeed/tests/test_commits.py b/codespeed/tests/test_commits.py new file mode 100644 index 00000000..3c09d03e --- /dev/null +++ b/codespeed/tests/test_commits.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +from datetime import datetime, timedelta +import subprocess +import tempfile +import os + +from django.test import TestCase, override_settings +from django.urls import reverse + +from codespeed.models import (Project, Benchmark, Revision, Branch, Executable, + Environment, Result, Report) + +hgdir = '' + +def setUpModule(): + global hgdir + hgdir = tempfile.TemporaryDirectory() + subprocess.check_call(['hg', 'init'], cwd=hgdir.name) + # Add some commits + readme = os.path.join(hgdir.name, 'README.md') + file1 = os.path.join(hgdir.name, 'file1.py') + with open(readme, 'w') as hg_file: + hg_file.write('readme') + subprocess.check_call(['hg', 'add', readme], cwd=hgdir.name) + subprocess.check_call(['hg', 'commit', '-m', "first commit"], cwd=hgdir.name) + with open(file1, 'w') as hg_file: + hg_file.write('value = 10') + subprocess.check_call(['hg', 'add', file1], cwd=hgdir.name) + subprocess.check_call(['hg', 'commit', '-m', "second commit"], cwd=hgdir.name) + +def tearDownModule(): + hgdir.cleanup() + +class TestMercurial(TestCase): + + def setUp(self): + self.days = 0 + self.hgdir = hgdir.name + self.starttime = datetime.now() + timedelta(days=-100) + + Project(repo_type='M', name='pro', + repo_path=str(self.hgdir)).save() + self.pro = Project.objects.get(name='pro') + + Branch(project=self.pro, name='default').save() + self.b = Branch.objects.get(name='default') + + Environment(name='Walden Pond').save() + Executable(name='walden', project=self.pro).save() + Benchmark(name='TestBench').save() + + self.env = Environment.objects.get(name='Walden Pond') + self.exe = Executable.objects.get(name='walden') + self.bench = Benchmark.objects.get(name='TestBench') + cmd = ['hg', '-R', self.hgdir, 'id', '-r', '1'] + self.cid = subprocess.check_output(cmd).split()[0] + Revision(commitid=self.cid.decode('utf-8'), date=self.starttime, branch=self.b, + project=self.pro).save() + + def test_hg(self): + response = self.client.get(reverse('displaylogs'), {'revisionid':1}) + assert response.status_code == 200, 'expected 200 got %d' % response.status_code diff --git a/codespeed/views.py b/codespeed/views.py index b498bdb4..7cbdfccd 100644 --- a/codespeed/views.py +++ b/codespeed/views.py @@ -94,12 +94,20 @@ def gethistoricaldata(request): # Fetch Baseline data baseline_exe = Executable.objects.get( name=settings.DEF_BASELINE['executable']) - baseline_lastrev = Revision.objects.filter( - branch__project=baseline_exe.project).order_by('-date')[0] + baseline_revs = Revision.objects.filter( + branch__project=baseline_exe.project).order_by('-date') + baseline_lastrev = baseline_revs[0] + for rev in baseline_revs: + baseline_results = Result.objects.filter( + executable=baseline_exe, revision=rev, environment=env) + if baseline_results: + baseline_lastrev = rev + break + if len(baseline_results) == 0: + logger.error('Could not find results for {} rev="{}" env="{}"'.format( + baseline_exe, baseline_lastrev, env)) data['baseline'] = '{} {}'.format( settings.DEF_BASELINE['executable'], baseline_lastrev.tag) - baseline_results = Result.objects.filter( - executable=baseline_exe, revision=baseline_lastrev, environment=env) default_exe = Executable.objects.get(name=settings.DEF_EXECUTABLE) default_branch = Branch.objects.get( @@ -108,21 +116,24 @@ def gethistoricaldata(request): # Fetch tagged revisions for default executable default_taggedrevs = Revision.objects.filter( - branch=default_branch - ).exclude(tag="").order_by('date') - data['tagged_revs'] = [rev.tag for rev in default_taggedrevs] + branch=default_branch + ).exclude(tag="").order_by('date') default_results = {} for rev in default_taggedrevs: - default_results[rev.tag] = Result.objects.filter( + res = Result.objects.filter( executable=default_exe, revision=rev, environment=env) - + if not res: + logger.info('no results for %s %s %s' % (str(default_exe), str(rev), str(env))) + continue + default_results[rev.tag] = res + data['tagged_revs'] = [rev.tag for rev in default_taggedrevs if rev.tag in default_results] # Fetch data for latest results revs = Revision.objects.filter( branch=default_branch).order_by('-date')[:5] default_lastrev = None for i in range(4): default_lastrev = revs[i] - if default_lastrev.results.filter(executable=default_exe): + if default_lastrev.results.filter(executable=default_exe, environment=env): break default_lastrev = None if default_lastrev is None: @@ -892,7 +903,6 @@ def add_result(request): return HttpResponseBadRequest(response) else: create_report_if_enough_data(response[0], response[1], response[2]) - logger.debug("add_result: completed") return HttpResponse("Result data saved successfully", status=202) @@ -917,15 +927,11 @@ def add_json_results(request): else: unique_reports.add(response) - logger.debug("add_json_results: about to create reports") for rep in unique_reports: create_report_if_enough_data(rep[0], rep[1], rep[2]) - logger.debug("add_json_results: completed") - return HttpResponse("All result data saved successfully", status=202) - def django_has_content_type(): return (django.VERSION[0] > 1 or (django.VERSION[0] == 1 and django.VERSION[1] >= 6)) diff --git a/deploy-requirements.txt b/deploy-requirements.txt new file mode 100644 index 00000000..ed1bed4e --- /dev/null +++ b/deploy-requirements.txt @@ -0,0 +1,3 @@ +. +psycopg2==2.7.7 +gunicorn==19.9.0 diff --git a/example/override/static/images/favicon.ico b/example/override/static/images/favicon.ico new file mode 100644 index 00000000..c79bb6de Binary files /dev/null and b/example/override/static/images/favicon.ico differ diff --git a/example/settings.py b/example/settings.py new file mode 100644 index 00000000..f63cf7ae --- /dev/null +++ b/example/settings.py @@ -0,0 +1,180 @@ +# -*- coding: utf-8 -*- +# Django settings for a speedcenter project. +import os +import os.path +import sys + +sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +BASEDIR = os.path.dirname(__file__) + +#: The directory which should contain checked out source repositories: +REPOSITORY_BASE_PATH = os.path.join(BASEDIR, "repos") + +ADMINS = ( + # ('Your Name', 'your_email@domain.com'), +) + +MANAGERS = ADMINS +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASEDIR, 'data.db'), + } +} + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# If running in a Windows environment this must be set to the same as your +# system time zone. +TIME_ZONE = 'America/Chicago' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'en-us' + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = False + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = os.path.join(BASEDIR, "media") + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash if there is a path component (optional in other cases). +# Examples: "http://media.lawrence.com", "http://example.com/media/" +MEDIA_URL = '/media/' + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = '/static/admin/' + +# Make this unique, and don't share it with anybody. +SECRET_KEY = 'as%n_m#)^vee2pe91^^@c))sl7^c6t-9r8n)_69%)2yt+(la2&' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + # 'django.template.loaders.eggs.load_template_source', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', +) + +if DEBUG: + import traceback + import logging + + # Define a class that logs unhandled errors + class LogUncatchedErrors: + def process_exception(self, request, exception): + logging.error("Unhandled Exception on request for %s\n%s" % + (request.build_absolute_uri(), + traceback.format_exc())) + # And add it to the middleware classes + MIDDLEWARE_CLASSES += ('settings.LogUncatchedErrors',) + + # set shown level of logging output to debug + logging.basicConfig(level=logging.DEBUG) + + +ROOT_URLCONF = 'example.urls' + +TEMPLATE_DIRS = ( + os.path.join(os.path.dirname(__file__), 'templates'), +) + +TEMPLATE_CONTEXT_PROCESSORS = ( + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + 'django.core.context_processors.debug', + 'django.core.context_processors.i18n', + 'django.core.context_processors.media', + 'django.core.context_processors.static', + 'django.core.context_processors.request', +) + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + #'django.contrib.sites', + 'django.contrib.admin', + 'django.contrib.staticfiles', + 'codespeed', + 'south' +) + +STATIC_URL = '/static/' + +STATIC_ROOT = os.path.join(BASEDIR, "sitestatic") + +# Codespeed settings that can be overwritten here. +## General default options ## +WEBSITE_NAME = "PyPy Speed Center" # This name will be used in the reports RSS feed + +#DEF_ENVIRONMENT = None #Name of the environment which should be selected as default + + +DEF_BASELINE = {'executable': 'cpython', 'revision': '101'} # Which executable + revision should be default as a baseline + # Given as the name of the executable and commitid of the revision + # Example: defaultbaseline = {'executable': 'myexe', 'revision': '21'} + +#TREND = 10 # Default value for the depth of the trend + # Used by reports for the latest runs and changes view + +# Threshold that determines when a performance change over the last result is significant +CHANGE_THRESHOLD = 5.0 + +# Threshold that determines when a performance change +# over a number of revisions is significant +TREND_THRESHOLD = 6.0 + +## Changes view options ## +#DEF_EXECUTABLE = None # Executable that should be chosen as default in the changes view + # Given as the name of the executable. + # Example: defaultexecutable = "myexe" + +## Timeline view options ## +#DEF_BENCHMARK = "grid" # Default selected benchmark. Possible values: + # "grid": will show the grid of plots + # "show_none": will just show a text message + # "mybench": will select benchmark "mybench" + +#TIMELINE_BRANCHES = True # NOTE: Only the default branch is currently shown + # Get timeline results for specific branches + # Set to False if you want timeline plots and results only for trunk. + +## Comparison view options ## +#CHART_TYPE = 'normal bars' # The options are 'normal bars', 'stacked bars' and 'relative bars' + +NORMALIZATION = True # True will enable normalization as the default selection + # in the Comparison view. The default normalization can be + # chosen in the defaultbaseline setting + +#CHART_ORIENTATION = 'vertical' # 'vertical' or 'horizontal can be chosen as + # default chart orientation + +COMP_EXECUTABLES = [('pypy-c-jit', 'L'), ('pypy-c', 'L')] # Which executable + revision should be checked as default + # Given as a list of tuples containing the + # name of an executable + commitid of a revision + # An 'L' denotes the last revision + # Example: + # COMP_EXECUTABLES = [ + # ('myexe', '21df2423ra'), + # ('myexe', 'L'),] + +from .local_settings import * + diff --git a/example/templates/base.html b/example/templates/base.html new file mode 100644 index 00000000..cc60dfb4 --- /dev/null +++ b/example/templates/base.html @@ -0,0 +1,75 @@ + + + + {% block title %}PyPy's Speed Center{% endblock %} + + + + + + + + + {% block extra_head %}{% endblock %} + + +
+ {# TODO: Rename id=title to id=header and/or switch to
#} +
+ {% block page_header %} + {% block logo %} + logo + {% endblock logo %} +

{% block page_title %}SPEED CENTER{% endblock page_title %}

+ {% block top_nav %} + + {% endblock top_nav %} + {% endblock page_header %} +
+ +
+ +
+{% block body %} +
Base template
+{% endblock %} +
+
+{% block footer %} + + + +{% endblock %} +
+ + + + diff --git a/manage.py b/manage.py index 1c3713d6..7cfa57cd 100755 --- a/manage.py +++ b/manage.py @@ -2,8 +2,8 @@ import os, sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sample_project.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "speed_pypy.settings") from django.core.management import execute_from_command_line - execute_from_command_line(sys.argv) + diff --git a/sample_project/templates/about.html b/sample_project/templates/about.html deleted file mode 100644 index 7eebe2e7..00000000 --- a/sample_project/templates/about.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "codespeed/base_site.html" %} -{% block title %}{{ block.super }}: About this site{% endblock %} -{% block body %} - -
-

About this site

-

<description of site and what benchmarks that are run>

-

This site runs on top of Django and Codespeed

-

About the benchmarks

-

The code can be found here.

-

About MyProject

-

<Description of the main project>

-

Main website: MySite

-

About Codespeed

-Codespeed is a web application to monitor and analyze the performance of your code. -

Code: github.com/tobami/codespeed

-

Wiki: wiki.github.com/tobami/codespeed/

-

Contact

-

For problems or suggestions about this website write to...

-
-{% endblock %} diff --git a/setup.py b/setup.py index 5cd5f0e9..8c3b6761 100644 --- a/setup.py +++ b/setup.py @@ -32,3 +32,4 @@ 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application', ] ) + diff --git a/sample_project/README.md b/speed_pypy/README.md similarity index 100% rename from sample_project/README.md rename to speed_pypy/README.md diff --git a/sample_project/__init__.py b/speed_pypy/__init__.py similarity index 100% rename from sample_project/__init__.py rename to speed_pypy/__init__.py diff --git a/speed_pypy/settings.py b/speed_pypy/settings.py new file mode 100644 index 00000000..d0c98f79 --- /dev/null +++ b/speed_pypy/settings.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +# Django settings for a Codespeed project. +import os + +from codespeed.settings import * +WEBSITE_NAME = "PyPy's Speed Center" # This name will be used in the reports RSS feed + +DEBUG = True + +BASEDIR = os.path.abspath(os.path.dirname(__file__)) +TOPDIR = os.path.split(BASEDIR)[1] + +#: The directory which should contain checked out source repositories: +REPOSITORY_BASE_PATH = os.path.join(BASEDIR, "repos") + +ADMINS = ( + # ('Your Name', 'your_email@domain.com'), +) + +MANAGERS = ADMINS +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASEDIR, 'data.db'), + } +} + +TIME_ZONE = 'America/Chicago' + +LANGUAGE_CODE = 'en-us' + +SITE_ID = 1 + +USE_I18N = False + +MEDIA_ROOT = os.path.join(BASEDIR, "media") + +MEDIA_URL = '/media/' + +SECRET_KEY = 'as%n_m#)^vee2pe91^^@c))sl7^c6t-9r8n)_69%)2yt+(la2&' + + +MIDDLEWARE = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', +) + +ROOT_URLCONF = '{0}.urls'.format(TOPDIR) + + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(BASEDIR, 'templates')], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.admin', + 'django.contrib.staticfiles', + 'codespeed', +) + + +STATIC_URL = '/static/' +STATIC_ROOT = os.path.join(BASEDIR, "sitestatic") +STATICFILES_DIRS = ( + os.path.join(BASEDIR, 'static'), +) + +SHOW_REPORTS = False +SHOW_HISTORICAL = True +DEF_BASELINE = {'executable': 'cpython', 'revision': '2.6.2'} +DEF_EXECUTABLE = 'pypy-c-jit' +DEF_ENVIRONMENT = 'tannit' + + +from .local_settings import * diff --git a/speed_pypy/static/.gitkeep b/speed_pypy/static/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/sample_project/templates/404.html b/speed_pypy/templates/404.html similarity index 100% rename from sample_project/templates/404.html rename to speed_pypy/templates/404.html diff --git a/sample_project/templates/500.html b/speed_pypy/templates/500.html similarity index 100% rename from sample_project/templates/500.html rename to speed_pypy/templates/500.html diff --git a/speed_pypy/templates/about.html b/speed_pypy/templates/about.html new file mode 100644 index 00000000..f05d10b1 --- /dev/null +++ b/speed_pypy/templates/about.html @@ -0,0 +1,29 @@ +{% extends "codespeed/base_site.html" %} +{% block title %}{{ block.super }}: About this site{% endblock %} +{% block body %} + +
+

About this site

+

We have nightly benchmark runs of pypy, together with cpython 2.6.2 data for comparison.

+

This site runs on top of Django and Codespeed

+

About the benchmarks

+

The code can be found here.

+

This is a benchmark suite based on Unladen Swallow, adapted for PyPY and +runs on Python2. For a port of these benchmarks to Python3 see the python speed site

+

About PyPy

+

PyPy is a very compliant implementation of the Python language.

+

Main website: pypy.org

+ +

Blog: morepypy.blogspot.com +

About Codespeed

+Codespeed is a web application to monitor and analyze the performance of your code. +

Code: github.com/tobami/codespeed

+

Wiki: wiki.github.com/tobami/codespeed/

+

Contact

+

For problems or suggestions about this website write to

+

the pypy-dev mailing list or directly to Miquel Torres (tobami at googlemail dot com)

+ +
+{% endblock %} diff --git a/sample_project/templates/admin/base_site.html b/speed_pypy/templates/admin/base_site.html similarity index 100% rename from sample_project/templates/admin/base_site.html rename to speed_pypy/templates/admin/base_site.html diff --git a/sample_project/templates/codespeed/base_site.html b/speed_pypy/templates/codespeed/base_site.html similarity index 83% rename from sample_project/templates/codespeed/base_site.html rename to speed_pypy/templates/codespeed/base_site.html index 0ba7ca30..5f5c6a01 100644 --- a/sample_project/templates/codespeed/base_site.html +++ b/speed_pypy/templates/codespeed/base_site.html @@ -1,5 +1,5 @@ {% extends "codespeed/base.html" %} {% block title %} - My Own Title + PyPy Speed {% endblock %} diff --git a/sample_project/templates/feeds/latest_description.html b/speed_pypy/templates/feeds/latest_description.html similarity index 100% rename from sample_project/templates/feeds/latest_description.html rename to speed_pypy/templates/feeds/latest_description.html diff --git a/sample_project/templates/feeds/latest_title.html b/speed_pypy/templates/feeds/latest_title.html similarity index 100% rename from sample_project/templates/feeds/latest_title.html rename to speed_pypy/templates/feeds/latest_title.html diff --git a/sample_project/templates/home.html b/speed_pypy/templates/home.html similarity index 97% rename from sample_project/templates/home.html rename to speed_pypy/templates/home.html index 2828033b..2a0ddf3c 100644 --- a/sample_project/templates/home.html +++ b/speed_pypy/templates/home.html @@ -179,6 +179,9 @@

How has {{ default_exe.project }} performance evolved over time?

renderer:$.jqplot.BarRenderer, showMarker: false }, + axesDefaults: { + tickRenderer: $.jqplot.CanvasAxisTickRenderer + }, series:[ { pointLabels:{labels:geolabels} @@ -187,7 +190,8 @@

How has {{ default_exe.project }} performance evolved over time?

axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer, - ticks: ticks + ticks: ticks, + tickOptions: {angle: -40} }, yaxis:{ min: 0, diff --git a/sample_project/urls.py b/speed_pypy/urls.py similarity index 100% rename from sample_project/urls.py rename to speed_pypy/urls.py diff --git a/speed_pypy/wsgi.py b/speed_pypy/wsgi.py new file mode 100644 index 00000000..6d7a2a33 --- /dev/null +++ b/speed_pypy/wsgi.py @@ -0,0 +1,8 @@ +# This is used for staging & production +import os +import sys + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "speed_pypy.settings") + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application()