From 753d53cd64fbb8bfcb7592029680e4139541b69b Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Sun, 17 Jul 2011 14:16:08 +0200 Subject: [PATCH 01/12] Custom PyPy about.html --- example/templates/about.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/example/templates/about.html b/example/templates/about.html index 931cf62b..51c1d4ad 100644 --- a/example/templates/about.html +++ b/example/templates/about.html @@ -1,22 +1,26 @@ -{% extends "base.html" %} +{% extends "site_base.html" %} {% block title %}{{ block.super }}: About this site{% endblock %} {% block body %}

About this site

-

<description of site and what benchmarks that are run>

+

We have nightly benchmark runs of pypy-c-jit and pypy-c, 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.

-

About MyProject

-

<Description of the main project>

-

Main website: MySite

+

The code can be found here and here.

+

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...

+

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 %} From a7aaa6427a2a33ab97377138853cc123f9368382 Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Sun, 17 Jul 2011 15:18:20 +0200 Subject: [PATCH 02/12] Custom PyPy settings --- example/settings.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/example/settings.py b/example/settings.py index 3b251f0c..8d7efaa3 100644 --- a/example/settings.py +++ b/example/settings.py @@ -124,7 +124,7 @@ def process_exception(self, request, exception): #DEF_ENVIRONMENT = None #Name of the environment which should be selected as default -#DEF_BASELINE = None # Which executable + revision should be default as a baseline +DEF_BASELINE = {'executable': 'cpython', 'revision': '100'} # 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'} @@ -132,11 +132,11 @@ def process_exception(self, request, exception): # 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 = 3.0 +CHANGE_THRESHOLD = 5.0 # Threshold that determines when a performance change # over a number of revisions is significant -#TREND_THRESHOLD = 5.0 +TREND_THRESHOLD = 6.0 ## Changes view options ## #DEF_EXECUTABLE = None # Executable that should be chosen as default in the changes view @@ -156,14 +156,14 @@ def process_exception(self, request, exception): ## Comparison view options ## #CHART_TYPE = 'normal bars' # The options are 'normal bars', 'stacked bars' and 'relative bars' -#NORMALIZATION = False # True will enable normalization as the default selection +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 = None # Which executable + revision should be checked as default +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 From a6b36a06804dffd9127417c7ab3de0d8ab74cc9b Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Sun, 17 Jul 2011 15:42:07 +0200 Subject: [PATCH 03/12] Add custom PyPy homepage --- codespeed/views.py | 45 +++++++++++ example/settings.py | 2 +- example/templates/home.html | 146 +++++++++++++++++++++++++++++++++++- example/urls.py | 4 +- 4 files changed, 191 insertions(+), 6 deletions(-) diff --git a/codespeed/views.py b/codespeed/views.py index b0e1a778..51f7de27 100644 --- a/codespeed/views.py +++ b/codespeed/views.py @@ -927,3 +927,48 @@ def add_json_results(request): logging.debug("add_json_results: completed") return HttpResponse("All result data saved successfully", status=202) + + +def get_home_data(request): + if request.method != 'GET': + return HttpResponseNotAllowed('GET') + data = {'results': {}, 'benchmarks': []} + env = Environment.objects.get(name='tannit') + # Fetch CPython data + cp_exe = Executable.objects.get(name="cpython") + cp_lastrev = Revision.objects.filter( + branch__project=cp_exe.project).order_by('-date')[0] + cp_results = Result.objects.filter( + executable=cp_exe, revision=cp_lastrev, environment=env) + # Fetch PyPy trunk data + pp_exe = Executable.objects.get(name="pypy-c-jit") + pp_branch = Branch.objects.get(name="default", project=pp_exe.project) + pp_lastrev = Revision.objects.filter(branch=pp_branch).order_by('-date')[0] + pp_results = Result.objects.filter( + executable=pp_exe, revision=pp_lastrev, environment=env) + # Fetch PyPy tagged revisions + pp_taggedrevs = Revision.objects.filter( + project=pp_exe.project + ).exclude(tag="").order_by('date') + data['tagged_revs'] = [rev.tag for rev in pp_taggedrevs] + pp_results = {'PyPy trunk': pp_results} + for rev in pp_taggedrevs: + pp_results[rev.tag] = Result.objects.filter( + executable=pp_exe, revision=rev, environment=env) + # Save data + benchmarks = [] + for res in cp_results: + if res == 0: + continue + benchmarks.append(res.benchmark.name) + key = 'CPython ' + cp_lastrev.tag + data['results'][res.benchmark.name] = {key: res.value} + for rev_name in pp_results: + val = 0 + for pp_res in pp_results[rev_name]: + if pp_res.benchmark.name == res.benchmark.name: + val = pp_res.value + data['results'][res.benchmark.name][rev_name] = val + benchmarks.sort() + data['benchmarks'] = benchmarks + return HttpResponse(json.dumps( data )) diff --git a/example/settings.py b/example/settings.py index 8d7efaa3..73027dcf 100644 --- a/example/settings.py +++ b/example/settings.py @@ -119,7 +119,7 @@ def process_exception(self, request, exception): # Codespeed settings that can be overwritten here. ## General default options ## -#WEBSITE_NAME = "MySpeedSite" # This name will be used in the reports RSS feed +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 diff --git a/example/templates/home.html b/example/templates/home.html index 30a553a5..168fbd1e 100644 --- a/example/templates/home.html +++ b/example/templates/home.html @@ -2,7 +2,137 @@ {% block extra_head %} {{ block.super }} + + + + + + + + + {% endblock %} @@ -50,6 +181,15 @@

Comparison

Compare different executables and revisions


-
+ +
+

How fast is PyPy?

+
+

Plot 1: The above plot represents PyPy trunk (with JIT) benchmark times normalized to CPython. Smaller is better.

+

While it depends greately on the type of taks being performed, currently PyPy takes % of the time that CPython needs to complete an average given task (represented by the geometric mean of all benchmarks), which means that PyPy is about times faster than CPython

+

How has PyPy performance evolved over time?

+
+

Plot 2: Geometric averages of normalized times, out of benchmarks. Smaller is better. "times faster" inside parenthesis

+
{% endblock body %} diff --git a/example/urls.py b/example/urls.py index 34c3fca1..a1f7628b 100644 --- a/example/urls.py +++ b/example/urls.py @@ -19,8 +19,8 @@ #('^$', redirect_to, {'url': '/speed/'}), ) -urlpatterns += patterns( - '', +urlpatterns += patterns('', + (r'^json/$', 'codespeed.views.get_home_data'), (r'^', include('codespeed.urls')), #(r'^speed/', include('codespeed.urls')), ) From 69d3f621d3eabab033aea8e182aed8d7ad001f43 Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Sun, 17 Jul 2011 15:44:19 +0200 Subject: [PATCH 04/12] Add Google Analytics script --- example/templates/base.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/example/templates/base.html b/example/templates/base.html index 1da6890d..252f11c4 100644 --- a/example/templates/base.html +++ b/example/templates/base.html @@ -50,5 +50,15 @@

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

{% endblock %} + + From 5029db8cd9496e2fd2e05fc02f539d12a8ab94df Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Sun, 17 Jul 2011 15:45:05 +0200 Subject: [PATCH 05/12] Add pointlabels jqplot plugin for Home page plot --- .../static/js/jqplot/jqplot.pointLabels.min.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 codespeed/static/js/jqplot/jqplot.pointLabels.min.js diff --git a/codespeed/static/js/jqplot/jqplot.pointLabels.min.js b/codespeed/static/js/jqplot/jqplot.pointLabels.min.js new file mode 100644 index 00000000..2bf8a86d --- /dev/null +++ b/codespeed/static/js/jqplot/jqplot.pointLabels.min.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2009 Chris Leonello + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can + * choose the license that best suits your project and use it accordingly. + * + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: + * chris dot leonello at gmail dot com or see http://www.jqplot.com/info.php . + * + * If you are feeling kind and generous, consider supporting the project by + * making a donation at: http://www.jqplot.com/donate.php . + */ +(function(c){c.jqplot.PointLabels=function(e){this.show=c.jqplot.config.enablePlugins;this.location="n";this.labelsFromSeries=false;this.seriesLabelIndex=null;this.labels=[];this.stackedValue=false;this.ypadding=6;this.xpadding=6;this.escapeHTML=true;this.edgeTolerance=0;this.hideZeros=false;c.extend(true,this,e)};var a=["nw","n","ne","e","se","s","sw","w"];var d={nw:0,n:1,ne:2,e:3,se:4,s:5,sw:6,w:7};var b=["se","s","sw","w","nw","n","ne","e"];c.jqplot.PointLabels.init=function(k,h,g,e){var n=c.extend(true,{},g,e);this.plugins.pointLabels=new c.jqplot.PointLabels(n.pointLabels);var f=this.plugins.pointLabels;if(f.labels.length==0||f.labelsFromSeries){if(f.stackedValue){if(this._plotData.length&&this._plotData[0].length){var m=f.seriesLabelIndex||this._plotData[0].length-1;for(var j=0;j');u.insertAfter(s.canvas);if(q.escapeHTML){u.text(m)}else{u.html(m)}var f=q.location;if(this.waterfall&&parseInt(m,10)<0){f=b[d[f]]}var l=v.u2p(y[r][0])+q.xOffset(u,f);var g=n.u2p(y[r][1])+q.yOffset(u,f);u.css("left",l);u.css("top",g);var j=l+c(u).width();var o=g+c(u).height();var x=q.edgeTolerance;var e=c(s.canvas).position().left;var t=c(s.canvas).position().top;var w=s.canvas.width+e;var k=s.canvas.height+t;if(l-xw||o+x>k){c(u).remove()}}}};c.jqplot.postSeriesInitHooks.push(c.jqplot.PointLabels.init);c.jqplot.postDrawSeriesHooks.push(c.jqplot.PointLabels.draw)})(jQuery); \ No newline at end of file From 96160f3a52d19b136ead35320cace3867bad5666 Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Sun, 17 Jul 2011 15:56:00 +0200 Subject: [PATCH 06/12] Add PyPy favicon --- example/override/static/images/favicon.ico | Bin 0 -> 3230 bytes example/templates/base.html | 1 + 2 files changed, 1 insertion(+) create mode 100644 example/override/static/images/favicon.ico diff --git a/example/override/static/images/favicon.ico b/example/override/static/images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c79bb6ded95b2a0035b0a9c47c7f2785cfbed0c1 GIT binary patch literal 3230 zcmcIm2~ZSA6rJ5!&S41Xf;r$ zqM;n$@_8clzhRx^3y<0yxNOOWLwN@5E3@F(uoR~Af}pCc0X2Osa6&;p<3>tWSl8 zttqR^inqu?o%-HNTpdlKHY5kogI*c5YB9RcX!0AL5>p~plPM99)42uv)7P)el8tFh0|Do15q5JsypNP(wD|-W z%=Ct3Od?$KiwUoy`dGk=bce_xKQ-72J*`R{s)|NMX$*2p;;^_m1G$|Wk#V{V$>*xz zx;YI|7aI`vL+yZm*!69YmS@5wB@m+wwFh#s%gBZ_a|yAWoru{7Pa|sIQKC9t^ASIC z zoN0(7olWsXJYF3F0p~}_JVh`?wMbp1-#EY?CUQ57nWW2fJ1G9|UF!^L*olnZM@Tr< zgMg}S(6*TYfl#PVeV#K50}WhinFFTJ>MxzD!?dlQBR%V|8jgF`eP!!}TR}1LD{q8< zMGMP;)u42chg;UH={Q#(GoXL0DvFJ(We{h0U4g*J$ioLgTX!O)aW59%1B<z95Od)MG#;&E!Y(i%UY-`x-gcgaM?OCQX8lfJr^n4Ob-Aq~3;dk0gx zdl9f@VE$iL+vdG%1IhPwv<6Lc(7Y-L*5+cC!{#^9e99FFrqTAVzUB2qvF9+6e|8Yj z`%hxLsRe|h5hI@R{%xqMig;}eb^P3>1RMXi)iEf}@kU&PEkwNVZ%WIfU}wTm=1vJ; zi)|$ctZgO9-B(Cb*JaE;a0)JYYuR`{enkK`yUAi)Y)d3v&GFbxwy~Vp|0aqH9~c|LQ05Jvnyn}yw(c%b z3}t?16UU*uHGv#&NhJH~lvwpq5OQ*Zky#jt^b#c$>y>a>u7K5IIjr&$;jn2Lk+oG4 zS#uS9>Z&2Du7RTcFf#i7K+b)Fz?wET?w>~M>a+DQq=|TeDJA{3EZG?+_N3#>-Sbh` zl8zN+O3d3B5BWMJWW`C4mZU*inggebe0bEAz;8!AA`iABj(*x&s|NJs1RRa|Zo@b$`flh7@CaIenFm n-h7oK08g>{Kj1qGh)S>fW0i+|;n>HN&;015(^x74VcF#$?Vs(& literal 0 HcmV?d00001 diff --git a/example/templates/base.html b/example/templates/base.html index 252f11c4..5ec7231a 100644 --- a/example/templates/base.html +++ b/example/templates/base.html @@ -9,6 +9,7 @@ + {% block extra_head %}{% endblock %} From b7e214b40fa90988f1f174c9215f22a1fff8480d Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Sun, 17 Jul 2011 20:15:34 +0200 Subject: [PATCH 07/12] Add legend to first "home" plot --- codespeed/static/css/main.css | 2 +- example/templates/home.html | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/codespeed/static/css/main.css b/codespeed/static/css/main.css index 0220fd30..815e00aa 100644 --- a/codespeed/static/css/main.css +++ b/codespeed/static/css/main.css @@ -123,7 +123,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/example/templates/home.html b/example/templates/home.html index 168fbd1e..3d667650 100644 --- a/example/templates/home.html +++ b/example/templates/home.html @@ -54,10 +54,11 @@ } trunk_geomean = Math.pow(trunk_geomean, 1/plotdata[0].length); var geofaster = 1/trunk_geomean; - $('#geomean').html((100*trunk_geomean).toFixed(1)); + $('#geomean').html(trunk_geomean.toFixed(2)); $('#geofaster').html(geofaster.toFixed(1)); // Render first plot plotoptions1 = { + legend:{show:true}, seriesDefaults: { showMarker: false, rendererOptions:{barPadding: 2, barMargin:5} @@ -67,10 +68,14 @@ }, series:[ { + label: 'PyPy trunk', renderer:$.jqplot.BarRenderer, pointLabels:{labels:labels} }, - {pointLabels:{show:false}} + { + label: 'CPython', + pointLabels:{show:false} + } ], axes: { xaxis: { @@ -85,7 +90,7 @@ } }; plot1 = $.jqplot("cpythonplot", plotdata, plotoptions1); - + // Prepare and render second plot var geomeans = [1.0]; var num_of_benchs = 0; @@ -109,6 +114,7 @@ geolabels.push(geomeans[i].toFixed(2) + " (" + (1/geomeans[i]).toFixed(1) + "x)"); } $('#num_of_benchs').html(num_of_benchs) + plotoptions2 = { seriesDefaults: { renderer:$.jqplot.BarRenderer, @@ -182,12 +188,13 @@

Comparison


-
+

How fast is PyPy?

Plot 1: The above plot represents PyPy trunk (with JIT) benchmark times normalized to CPython. Smaller is better.

-

While it depends greately on the type of taks being performed, currently PyPy takes % of the time that CPython needs to complete an average given task (represented by the geometric mean of all benchmarks), which means that PyPy is about times faster than CPython

+

It depends greatly on the type of task being performed. The geometric average of all benchmarks is or times faster than CPython

How has PyPy performance evolved over time?

+

Plot 2: Geometric averages of normalized times, out of benchmarks. Smaller is better. "times faster" inside parenthesis

From 9f75a7066e71ff45aeb1db037ae753cdac3b8b2b Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Mon, 18 Jul 2011 21:56:27 +0200 Subject: [PATCH 08/12] Don't choose a revision that doesn't have results for pypy-c-jit --- codespeed/views.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/codespeed/views.py b/codespeed/views.py index 51f7de27..27a375c3 100644 --- a/codespeed/views.py +++ b/codespeed/views.py @@ -308,7 +308,7 @@ def comparison(request): pass # The selected baseline was not checked except: pass # Keep "none" as default baseline - print selectedbaseline + selecteddirection = False if 'hor' in data and data['hor'] == "true" or\ hasattr(settings, 'CHART_ORIENTATION') and settings.CHART_ORIENTATION == 'horizontal': @@ -940,21 +940,32 @@ def get_home_data(request): branch__project=cp_exe.project).order_by('-date')[0] cp_results = Result.objects.filter( executable=cp_exe, revision=cp_lastrev, environment=env) - # Fetch PyPy trunk data + pp_exe = Executable.objects.get(name="pypy-c-jit") pp_branch = Branch.objects.get(name="default", project=pp_exe.project) - pp_lastrev = Revision.objects.filter(branch=pp_branch).order_by('-date')[0] - pp_results = Result.objects.filter( - executable=pp_exe, revision=pp_lastrev, environment=env) # Fetch PyPy tagged revisions pp_taggedrevs = Revision.objects.filter( project=pp_exe.project ).exclude(tag="").order_by('date') data['tagged_revs'] = [rev.tag for rev in pp_taggedrevs] - pp_results = {'PyPy trunk': pp_results} + pp_results = {} for rev in pp_taggedrevs: pp_results[rev.tag] = Result.objects.filter( executable=pp_exe, revision=rev, environment=env) + + # Fetch PyPy trunk data + revs = Revision.objects.filter(branch=pp_branch).order_by('-date')[:5] + pp_lastrev = None + for i in range(4): + pp_lastrev = revs[i] + if pp_lastrev.results.filter(executable=pp_exe): + break + pp_lastrev = None + if pp_lastrev is None: + return HttpResponse(json.dumps( data )) + pp_results['PyPy trunk'] = Result.objects.filter( + executable=pp_exe, revision=pp_lastrev, environment=env) + # Save data benchmarks = [] for res in cp_results: From 601625940ebda49f9665095a142b88e15ca05e57 Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Sun, 21 Aug 2011 17:37:21 +0200 Subject: [PATCH 09/12] Improve pypy branch query, set WEBSITE_NAME and project name in template --- codespeed/settings.py | 2 +- codespeed/views.py | 2 +- example/templates/base.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codespeed/settings.py b/codespeed/settings.py index 8340aa7f..3bcb7e54 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/views.py b/codespeed/views.py index 27a375c3..bc844b73 100644 --- a/codespeed/views.py +++ b/codespeed/views.py @@ -945,7 +945,7 @@ def get_home_data(request): pp_branch = Branch.objects.get(name="default", project=pp_exe.project) # Fetch PyPy tagged revisions pp_taggedrevs = Revision.objects.filter( - project=pp_exe.project + branch=pp_branch ).exclude(tag="").order_by('date') data['tagged_revs'] = [rev.tag for rev in pp_taggedrevs] pp_results = {} diff --git a/example/templates/base.html b/example/templates/base.html index 5ec7231a..af7d6b92 100644 --- a/example/templates/base.html +++ b/example/templates/base.html @@ -1,8 +1,8 @@ - {% block title %}MyProject's Speed Center{% endblock %} - + {% block title %}PyPy's Speed Center{% endblock %} + From 224babeaf27a9a0cbb6599d1adf2fb1f468b490a Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Thu, 17 May 2012 11:53:48 +0200 Subject: [PATCH 10/12] Use the proper key for CPython data Update default baseline Increase width of second graph --- codespeed/views.py | 4 ++-- example/settings.py | 2 +- example/templates/home.html | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/codespeed/views.py b/codespeed/views.py index 303be50f..2e457907 100644 --- a/codespeed/views.py +++ b/codespeed/views.py @@ -935,6 +935,7 @@ def get_home_data(request): cp_exe = Executable.objects.get(name="cpython") cp_lastrev = Revision.objects.filter( branch__project=cp_exe.project).order_by('-date')[0] + data['baseline'] = 'CPython ' + cp_lastrev.tag cp_results = Result.objects.filter( executable=cp_exe, revision=cp_lastrev, environment=env) @@ -969,8 +970,7 @@ def get_home_data(request): if res == 0: continue benchmarks.append(res.benchmark.name) - key = 'CPython ' + cp_lastrev.tag - data['results'][res.benchmark.name] = {key: res.value} + data['results'][res.benchmark.name] = {data['baseline']: res.value} for rev_name in pp_results: val = 0 for pp_res in pp_results[rev_name]: diff --git a/example/settings.py b/example/settings.py index 07823e07..f767132e 100644 --- a/example/settings.py +++ b/example/settings.py @@ -124,7 +124,7 @@ def process_exception(self, request, exception): #DEF_ENVIRONMENT = None #Name of the environment which should be selected as default -DEF_BASELINE = {'executable': 'cpython', 'revision': '100'} # Which executable + revision should be default as a baseline +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'} diff --git a/example/templates/home.html b/example/templates/home.html index 3d667650..26b35ee7 100644 --- a/example/templates/home.html +++ b/example/templates/home.html @@ -38,7 +38,7 @@ add_to_tagged_data = false; } if (add_to_tagged_data === false) { break; } - relative_value = data['results'][benchname][rev]/data['results'][benchname]['CPython 2.6.2']; + relative_value = data['results'][benchname][rev]/data['results'][benchname][data['baseline']]; tagged_data[i].push(relative_value) } // Only add benchmark if there are no 0 values @@ -46,7 +46,7 @@ // First add benchmark benchmarks.push(benchname); // Add PyPy trunk and CPython's 1.0 value - relative_value = data['results'][benchname]['PyPy trunk']/data['results'][benchname]['CPython 2.6.2']; + relative_value = data['results'][benchname]['PyPy trunk']/data['results'][benchname][data['baseline']]; plotdata[0].push(relative_value); plotdata[1].push(1.0); labels.push(relative_value.toFixed(2)); @@ -73,7 +73,7 @@ pointLabels:{labels:labels} }, { - label: 'CPython', + label: data['baseline'], pointLabels:{show:false} } ], @@ -84,7 +84,7 @@ tickOptions: {angle: -40} }, yaxis:{ - ticks: [0, 0.25, 0.5, 0.75, 1, 1.25, 1.5], + ticks: [0, 0.25, 0.5, 0.75, 1, 1.25], tickOptions:{formatString:'%.2f'} } } @@ -104,7 +104,7 @@ geomeans.push(tempgeo); } geomeans.push(trunk_geomean); - var ticks = ['CPython 2.6.2']; + var ticks = [data['baseline']]; for (var i in data['tagged_revs']) { ticks.push(data['tagged_revs'][i]); } @@ -195,7 +195,7 @@

How fast is PyPy?

It depends greatly on the type of task being performed. The geometric average of all benchmarks is or times faster than CPython

How has PyPy performance evolved over time?

-
+

Plot 2: Geometric averages of normalized times, out of benchmarks. Smaller is better. "times faster" inside parenthesis

From e4919086cc6912268c3cc2d2ebc67e733743949b Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Fri, 8 Jun 2012 14:43:38 +0200 Subject: [PATCH 11/12] Invert plot 2 --- example/templates/home.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/example/templates/home.html b/example/templates/home.html index 26b35ee7..bc3b8edf 100644 --- a/example/templates/home.html +++ b/example/templates/home.html @@ -101,17 +101,19 @@ tempgeo *= tagged_data[i][j]; } tempgeo = Math.pow(tempgeo, 1/tagged_data[i].length); + tempgeo = 1/tempgeo; geomeans.push(tempgeo); } - geomeans.push(trunk_geomean); + geomeans.push(1/trunk_geomean); var ticks = [data['baseline']]; for (var i in data['tagged_revs']) { ticks.push(data['tagged_revs'][i]); } ticks.push('PyPy trunk'); var geolabels = new Array(); - for (var i in geomeans) { - geolabels.push(geomeans[i].toFixed(2) + " (" + (1/geomeans[i]).toFixed(1) + "x)"); + for (var i in geomeans) { +// geolabels.push(geomeans[i].toFixed(2) + " (" + (1/geomeans[i]).toFixed(1) + "x)"); + geolabels.push(geomeans[i].toFixed(2) + "x"); } $('#num_of_benchs').html(num_of_benchs) @@ -131,7 +133,8 @@ ticks: ticks }, yaxis:{ - ticks: [0.0, 0.25, 0.5, 0.75, 1.0, 1.25], +// ticks: [0.0, 0.25, 0.5, 0.75, 1.0, 1.25], + min: 0, tickOptions:{formatString:'%.2f'} } } @@ -196,7 +199,7 @@

How fast is PyPy?

How has PyPy performance evolved over time?

-

Plot 2: Geometric averages of normalized times, out of benchmarks. Smaller is better. "times faster" inside parenthesis

+

Plot 2: Speedup compared to CPython, using the inverse of the geometric average of normalized times, out of benchmarks.

{% endblock body %} From 2d9325e01c29e73fde30a4f7f6de2894160a8daf Mon Sep 17 00:00:00 2001 From: Miquel Torres Date: Fri, 8 Jun 2012 15:04:38 +0200 Subject: [PATCH 12/12] Add reference to paper explaining geometric mean for normalized results --- example/templates/home.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/templates/home.html b/example/templates/home.html index bc3b8edf..141abff3 100644 --- a/example/templates/home.html +++ b/example/templates/home.html @@ -199,7 +199,7 @@

How fast is PyPy?

How has PyPy performance evolved over time?

-

Plot 2: Speedup compared to CPython, using the inverse of the geometric average of normalized times, out of benchmarks.

+

Plot 2: Speedup compared to CPython, using the inverse of the geometric average of normalized times, out of benchmarks (see paper on why the geometric mean is better for normalized results).

{% endblock body %}