Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
753d53c
Custom PyPy about.html
tobami Jul 17, 2011
a80a280
Merge commit 'f5447b41ddd74e45af1a776369a8c0d474214b46' into pypy
tobami Jul 17, 2011
578ec57
Merge commit '7d966f80d3f331d80b2bce2364c0de591adf80d4' into pypy
tobami Jul 17, 2011
a7aaa64
Custom PyPy settings
tobami Jul 17, 2011
be786bd
Merge branch 'master' into pypy
tobami Jul 17, 2011
a6b36a0
Add custom PyPy homepage
tobami Jul 17, 2011
69d3f62
Add Google Analytics script
tobami Jul 17, 2011
5029db8
Add pointlabels jqplot plugin for Home page plot
tobami Jul 17, 2011
96160f3
Add PyPy favicon
tobami Jul 17, 2011
b7e214b
Add legend to first "home" plot
tobami Jul 17, 2011
5e0fecf
Merge remote branch 'origin/master' into pypy
tobami Jul 18, 2011
148f927
Merge remote branch 'origin/master' into pypy
tobami Jul 18, 2011
9f75a70
Don't choose a revision that doesn't have results for pypy-c-jit
tobami Jul 18, 2011
6016259
Improve pypy branch query, set WEBSITE_NAME and project name in template
tobami Aug 21, 2011
55030e2
Merge remote-tracking branch 'origin/master' into pypy
tobami Sep 4, 2011
eaea00d
Merge remote-tracking branch 'origin/master' into pypy
tobami Sep 4, 2011
224babe
Use the proper key for CPython data
tobami May 17, 2012
e491908
Invert plot 2
tobami Jun 8, 2012
2d9325e
Add reference to paper explaining geometric mean for normalized results
tobami Jun 8, 2012
51d4b63
exec wrapper script.
coderanger Jan 6, 2013
9da7418
unix is hard.
coderanger Jan 6, 2013
2084839
No really, I'm bad at unix.
coderanger Jan 6, 2013
b2056a7
Incrase the size of a field
Jan 7, 2013
5dfa14f
tilt xlabels on Plot 2
mattip Nov 28, 2014
301a98d
Merge pull request #1 from mattip/pypy
alex Nov 29, 2014
3875765
whoops
mattip Nov 29, 2014
85afa28
Merge pull request #2 from mattip/pypy
alex Nov 29, 2014
5a3bb8c
test, fix angling x-axis on cpythonplot2
mattip Dec 26, 2014
d5d8a0c
Merge pull request #3 from mattip/pypy
alex Dec 26, 2014
97f81b6
add a deploy-requirements.txt
ewdurbin Feb 22, 2019
36086d3
add wsgi entrypoint
ewdurbin Feb 22, 2019
4fc00dd
allow local_settings.py overrides
ewdurbin Feb 22, 2019
bcd4480
seems that this isn't handling Django > 1.4...
ewdurbin Feb 22, 2019
fa1abb4
don't use a relative import
ewdurbin Feb 22, 2019
b07808f
make it so
ewdurbin Feb 22, 2019
aae7f89
Custom PyPy about.html
tobami Jul 17, 2011
9c3ec4d
Custom PyPy settings
tobami Jul 17, 2011
34f7def
Add custom PyPy homepage
tobami Jul 17, 2011
ab6063c
Add Google Analytics script
tobami Jul 17, 2011
4adbb14
Add pointlabels jqplot plugin for Home page plot
tobami Jul 17, 2011
de207b9
Add PyPy favicon
tobami Jul 17, 2011
e2b197f
Add legend to first "home" plot
tobami Jul 17, 2011
209dab0
Don't choose a revision that doesn't have results for pypy-c-jit
tobami Jul 18, 2011
b5b96d1
Improve pypy branch query, set WEBSITE_NAME and project name in template
tobami Aug 21, 2011
3e9c67f
Use the proper key for CPython data
tobami May 17, 2012
23d5aaf
Invert plot 2
tobami Jun 8, 2012
c15ab3b
Add reference to paper explaining geometric mean for normalized results
tobami Jun 8, 2012
cdb2941
exec wrapper script.
coderanger Jan 6, 2013
10bec19
unix is hard.
coderanger Jan 6, 2013
29dec69
No really, I'm bad at unix.
coderanger Jan 6, 2013
92fd0b1
Incrase the size of a field
Jan 7, 2013
65a938d
tilt xlabels on Plot 2
mattip Nov 28, 2014
3de9041
whoops
mattip Nov 29, 2014
92d277d
test, fix angling x-axis on cpythonplot2
mattip Dec 26, 2014
bfccbec
add a deploy-requirements.txt
ewdurbin Feb 22, 2019
5f4eeed
add wsgi entrypoint
ewdurbin Feb 22, 2019
f15a605
allow local_settings.py overrides
ewdurbin Feb 22, 2019
f7cbe31
seems that this isn't handling Django > 1.4...
ewdurbin Feb 22, 2019
a586c60
don't use a relative import
ewdurbin Feb 22, 2019
1e08ed1
make it so
ewdurbin Feb 22, 2019
e411982
merge default into branch
mattip Apr 1, 2019
984b0d8
fix merge and update
mattip Apr 2, 2019
ba2fd71
ENH: handle environment for historical data
mattip Apr 3, 2019
a5beed6
merge speed.pypy.org from python/codespeed
mattip Apr 4, 2019
039f99e
remove file from old data model
mattip Apr 4, 2019
f3b5c84
fix merge
mattip Apr 4, 2019
4751450
move from sample_project to speed_pypy
mattip Apr 8, 2019
ffa154f
Merge pull request #1 from mattip/speed.pypy.org
ewdurbin Apr 8, 2019
e065bbd
Update wsgi.py
ewdurbin Apr 8, 2019
09aa41c
update manage.py settings
ewdurbin Apr 8, 2019
a709f47
make this directory so collectstatic doesn't complain
ewdurbin Apr 8, 2019
2f3ee82
BUG: stdout is bytes, convert to str
mattip Apr 19, 2019
47c2062
Merge pull request #2 from mattip/fix-hg
mattip May 7, 2019
5e1bdae
BUG: stdout is bytes on python3
mattip Apr 18, 2019
a4919d4
Merge branch 'speed.pypy.org' into mercurial
mattip May 7, 2019
56bab48
Merge pull request #3 from mattip/mercurial
mattip May 7, 2019
da0b957
BUG: extend range for finding latest historical results
mattip May 27, 2019
2aabac2
Merge pull request #4 from mattip/speed.pypy.org
mattip May 27, 2019
e72b594
MAINT: change default environment
mattip May 27, 2019
d453f75
Merge pull request #5 from mattip/speed.pypy.org
mattip May 27, 2019
b5573f1
Change exe for new benchmarks, still report historical data for old exe
mattip Jan 22, 2020
fb121f5
Merge pull request #6 from mattip/change-exe
mattip Jan 27, 2020
c4e1e8c
avoid zero values when calculating geomean
mattip Jan 28, 2020
6eba601
Merge pull request #7 from mattip/avoid-zero
mattip Jan 28, 2020
85ccb1f
revert change allowing any exe in graph
mattip Jan 28, 2020
6a831e5
Merge pull request #8 from mattip/revert-exe
mattip Jan 28, 2020
270d607
comparison page: use the DEF_ENVIRONMENT when loading the page, unche…
mattip Jan 28, 2020
2c9f5eb
Merge pull request #9 from mattip/deemphasize-old
mattip Jan 28, 2020
5b8a34e
unbreak timeline
mattip Feb 3, 2020
1f342cc
Merge pull request #11 from mattip/unbreak-timeline
mattip Feb 3, 2020
bf05f35
MAINT: more deeply embed DEFAULT_EXECUTABLE into historical data plots
mattip Apr 18, 2019
1a12a71
fixed Additionally
0xflotus May 12, 2019
183da75
Update authentication helper so it works correctly with Django versions
Kami Feb 11, 2020
7e2fed9
Fix typo.
Kami Feb 11, 2020
34a6055
Add some (mock based) tests for the auth decorator.
Kami Feb 11, 2020
40d38ee
merge tobami/master into branch
mattip Oct 26, 2020
9abbb6f
backward compatibility django shim
mattip Oct 26, 2020
ae7184b
use python3, pypy3 for front page
mattip Oct 26, 2020
45e92d5
Merge pull request #12 from mattip/use-python3
mattip Oct 26, 2020
b7c5634
use name,project in DEF_EXECUTABLE
mattip Nov 10, 2020
89e5b46
Merge pull request #13 from mattip/exe_name
mattip Nov 11, 2020
22d3b72
set default project to pypy3.7
mattip Dec 30, 2020
47bb049
Merge pull request #14 from mattip/speed.pypy.org
mattip Dec 30, 2020
8e851dd
updates to codespeed for hg hash, pypy3.9, links on about page
mattip Feb 20, 2022
18cb6c4
Merge pull request #15 from mattip/hg-hash
mattip Mar 23, 2022
9d4a613
setuptools-markdown is deprecated
ewdurbin Jun 24, 2022
1e6797a
Upgrade deploy-requirements.txt for speed.pypy.org to latest versions
cegerhardson Jul 25, 2022
28b2e7f
Merge pull request #16 from cegerhardson/patch-2
ewdurbin Jul 25, 2022
0693686
add hardware description to /about
mattip Oct 9, 2022
3658338
Merge pull request #18 from mattip/about2
mattip Oct 9, 2022
b6a2efd
typo
mattip Oct 9, 2022
fed46f3
Merge pull request #19 from mattip/about3
mattip Oct 9, 2022
7b0e672
Update dependencies to work with Python 3.10
diegorusso Jan 17, 2024
782d959
Merge pull request #38 from diegorusso/speed.pypy.org
mattip Jan 17, 2024
be193d9
updates for django>2
mattip Jan 18, 2024
20824b0
Merge pull request #39 from mattip/django-3
mattip Jan 18, 2024
b3770de
Use psycopg2 with Django 3
ambv Jan 18, 2024
5c9300a
Update the link to the repo at the bottom of pages
omasanori Feb 24, 2024
1eff5d1
Merge pull request #45 from omasanori/update-repo-link
mattip Feb 24, 2024
ac68f9b
Show full date/time in the revision admin view
diegorusso Jan 23, 2024
abc817f
Merge pull request #46 from mattip/speed.pypy.org
mattip Feb 27, 2024
dec272f
allow more than one DEF_EXECUTABLES to show on historic graph
mattip Aug 18, 2024
af1854d
also allow multiple baselines
mattip Aug 18, 2024
c79de33
Merge pull request #52 from mattip/multiple-exes
mattip Aug 19, 2024
b62c60d
add cpython3.12.4 to homepage
mattip Aug 19, 2024
7f7c0dd
Merge pull request #53 from mattip/cpython3.12
mattip Aug 19, 2024
d221387
reverse the historical data sorting
mattip Aug 28, 2024
010389e
Merge pull request #54 from mattip/reverse
mattip Aug 28, 2024
bb3d41a
compare to cpython3.11, fix some tools
mattip Dec 25, 2024
f625698
Merge pull request #55 from mattip/cpython-baseline
mattip Dec 25, 2024
0ffc987
comparison: fix previous commit, make permalink work
mattip Dec 27, 2024
b200f16
Merge pull request #56 from mattip/fix-permalink
mattip Dec 27, 2024
3ba0525
make comparison page more performant
mattip Apr 27, 2026
7f6f6c1
comparison: add arrows and pre-fold exe headings
mattip Apr 27, 2026
0d6dba2
make normalization pulldown reflect checked exes, default to horizontal
mattip Apr 27, 2026
5eeb430
use default normalization
mattip Apr 27, 2026
654c868
cache results
mattip Apr 27, 2026
9fd4284
migrate to chart.js v4.4.4 in comparison page
mattip Apr 27, 2026
496d6ae
move timeline to use dygraphs and present error bars
mattip Apr 27, 2026
90fefb2
tweak
mattip Apr 27, 2026
d60173c
make tooltip follow cursor on comparison page
mattip Apr 27, 2026
d77fbfa
refactor home page to use chart.js
mattip Apr 27, 2026
ae6af79
cleanup and remove jqplot, jquery.address
mattip Apr 27, 2026
17a96fb
tweak homepage graph
mattip Apr 27, 2026
a96ef2b
Merge pull request #59 from mattip/comparison
mattip Apr 28, 2026
daf674b
fix test failures and add a github action to run them
mattip Apr 29, 2026
ad2dd17
add missing file
mattip Apr 29, 2026
f328b31
use modern assertEqual and friends in tests
mattip Apr 29, 2026
ec49688
Merge pull request #60 from mattip/fix-tests
mattip Apr 29, 2026
3a4d60f
rename Benchmark.benchmark_type to source, add Result.suite_version
mattip Apr 29, 2026
044f863
group comparison page by source, update fixtures and tests
mattip Apr 29, 2026
c3ca151
Thread suite_version and source through save_result; filter home page…
mattip Apr 29, 2026
e22558f
include suite_version in timeline data points
mattip Apr 29, 2026
af72a5f
Draw version boundary lines on timeline when suite_version changes
mattip Apr 29, 2026
686b468
Warn on suite_version mismatch in comparison view
mattip Apr 29, 2026
0c36e77
fix migration
mattip May 2, 2026
f69154b
add bulk action to admin/branch
mattip May 3, 2026
95a77f7
pad x axis in timeline view
mattip May 3, 2026
1a13de7
show single point in timeline
mattip May 3, 2026
d7a4123
improve comparison for more than one environ
mattip May 3, 2026
872e78a
protect against empty normalization
mattip May 3, 2026
334bf6e
add a csv export option to the comparison page
mattip May 4, 2026
068e3c8
css
mattip May 4, 2026
802b1ee
Merge pull request #61 from mattip/pyperformance
mattip May 8, 2026
3757ae0
Update to new PyPy logo
StanFromIreland May 8, 2026
d49a487
speed.pypy.org: Remove space before colons in page titles
StanFromIreland May 8, 2026
9965f49
Merge pull request #63 from StanFromIreland/space-in-title
mattip May 9, 2026
3868aee
Merge pull request #62 from StanFromIreland/update-logo
mattip May 9, 2026
332fe25
speed.python.org: Tidy up 'About' page
StanFromIreland May 9, 2026
f858c7d
Remove sentance
StanFromIreland May 11, 2026
7843093
Merge pull request #65 from StanFromIreland/about
mattip May 11, 2026
aed5760
show which revisions have results in changes page
mattip May 26, 2026
29b6015
make change revision queries work in bulk
mattip May 26, 2026
9eb1f6c
Merge pull request #66 from mattip/changes-per-environment
mattip May 26, 2026
46e1b65
prevent uploading a revision that already exists to a different branch
mattip May 26, 2026
1374a23
Merge pull request #67 from mattip/reject-duplicate
mattip May 26, 2026
b7a3982
add a dump button to admin page and manage.py import_sqlite_dump file
mattip May 26, 2026
1dd5461
Merge pull request #68 from mattip/download-data
mattip May 26, 2026
4f4c919
keep file open
mattip May 26, 2026
3e55b90
Merge pull request #69 from mattip/download-data_2
mattip May 26, 2026
94d8e3c
allow up to two environments on timeline and other smaller fixes
mattip May 27, 2026
0781320
fix tests
mattip May 27, 2026
58fb9f1
Merge pull request #71 from mattip/multiple-timelines
mattip May 27, 2026
2239844
add geomean summary to comparison page iff two exes and one env
mattip May 29, 2026
a37dc8d
simplify permalink on comparison page
mattip May 29, 2026
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
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tests

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install dependencies
run: pip install -e .

- name: Run tests
run: python manage.py test codespeed --settings=codespeed.tests.settings
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.DS_Store
*.db
sample_project/repos/*
speed_pypy/repos/*
override
build
dist
Expand Down
13 changes: 12 additions & 1 deletion codespeed/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,23 @@ class ProjectAdmin(admin.ModelAdmin):
class BranchAdmin(admin.ModelAdmin):
list_display = ('name', 'project', 'display_on_comparison_page')
list_filter = ('project',)
actions = ['enable_comparison_page', 'disable_comparison_page']

@admin.action(description='Display selected branches on comparison page')
def enable_comparison_page(self, request, queryset):
queryset.update(display_on_comparison_page=True)

@admin.action(description='Hide selected branches from comparison page')
def disable_comparison_page(self, request, queryset):
queryset.update(display_on_comparison_page=False)


@admin.register(Revision)
class RevisionAdmin(admin.ModelAdmin):
list_display = ('commitid', 'branch', 'tag', 'date')
list_filter = ('branch__project', 'branch', 'tag', 'date')
search_fields = ('commitid', 'tag')
raw_id_fields = ('branch',)


@admin.register(Executable)
Expand All @@ -58,7 +68,7 @@ class ExecutableAdmin(admin.ModelAdmin):

@admin.register(Benchmark)
class BenchmarkAdmin(admin.ModelAdmin):
list_display = ('name', 'benchmark_type', 'data_type', 'description',
list_display = ('name', 'source', 'data_type', 'description',
'units_title', 'units', 'lessisbetter',
'default_on_comparison')
list_filter = ('data_type', 'lessisbetter')
Expand All @@ -78,6 +88,7 @@ class ResultAdmin(admin.ModelAdmin):
list_display = ('revision', 'benchmark', 'executable', 'environment',
'value', 'date')
list_filter = ('environment', 'executable', 'date', 'benchmark')
raw_id_fields = ('revision', 'benchmark', 'executable', 'environment')


def recalculate_report(modeladmin, request, queryset):
Expand Down
176 changes: 176 additions & 0 deletions codespeed/admin_views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
import os
import sqlite3
import tempfile
from datetime import datetime, date

from django.contrib.admin.views.decorators import staff_member_required
from django.http import FileResponse

from django.db import connection

SIZE_LIMIT = 95 * 1024 * 1024 # 95 MB

# Schema for the exported SQLite file, in FK-safe creation order.
# Column names must match Django's generated PostgreSQL column names exactly.
_SCHEMA = """
PRAGMA foreign_keys = OFF;

CREATE TABLE codespeed_project (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
repo_type TEXT NOT NULL,
repo_path TEXT NOT NULL,
repo_user TEXT NOT NULL,
repo_pass TEXT NOT NULL,
commit_browsing_url TEXT NOT NULL,
track INTEGER NOT NULL,
default_branch TEXT NOT NULL
);

CREATE TABLE codespeed_branch (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
project_id INTEGER NOT NULL,
display_on_comparison_page INTEGER NOT NULL
);

CREATE TABLE codespeed_executable (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
description TEXT NOT NULL,
project_id INTEGER NOT NULL
);

CREATE TABLE codespeed_environment (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
cpu TEXT NOT NULL,
memory TEXT NOT NULL,
os TEXT NOT NULL,
kernel TEXT NOT NULL
);

CREATE TABLE codespeed_benchmark (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
parent_id INTEGER,
source TEXT NOT NULL,
data_type TEXT NOT NULL,
description TEXT NOT NULL,
units_title TEXT NOT NULL,
units TEXT NOT NULL,
lessisbetter INTEGER NOT NULL,
default_on_comparison INTEGER NOT NULL
);

CREATE TABLE codespeed_revision (
id INTEGER PRIMARY KEY,
commitid TEXT NOT NULL,
tag TEXT NOT NULL,
date TEXT,
message TEXT NOT NULL,
project_id INTEGER,
author TEXT NOT NULL,
branch_id INTEGER NOT NULL
);

CREATE TABLE codespeed_result (
id INTEGER PRIMARY KEY,
value REAL NOT NULL,
std_dev REAL,
val_min REAL,
val_max REAL,
q1 REAL,
q3 REAL,
suite_version TEXT NOT NULL,
date TEXT,
revision_id INTEGER NOT NULL,
executable_id INTEGER NOT NULL,
benchmark_id INTEGER NOT NULL,
environment_id INTEGER NOT NULL
);
"""

_SMALL_TABLES = [
'codespeed_project',
'codespeed_branch',
'codespeed_executable',
'codespeed_environment',
'codespeed_benchmark',
'codespeed_revision',
]


def _conv(v):
"""Convert PostgreSQL Python types to SQLite-safe scalars."""
if isinstance(v, (datetime, date)):
return v.isoformat()
return v


def _build_sqlite(path):
lite = sqlite3.connect(path)
try:
lite.executescript(_SCHEMA)
lite.commit()

with connection.cursor() as pg:
for table in _SMALL_TABLES:
pg.execute(f'SELECT * FROM {table}')
cols = [d[0] for d in pg.description]
rows = [tuple(_conv(v) for v in row) for row in pg.fetchall()]
if rows:
ph = ', '.join(['?'] * len(cols))
lite.executemany(
f"INSERT INTO {table} ({', '.join(cols)}) VALUES ({ph})",
rows,
)
lite.commit()

# Result table: newest-first, stop at size cap
pg.execute(
'SELECT * FROM codespeed_result ORDER BY date DESC NULLS LAST'
)
cols = [d[0] for d in pg.description]
ph = ', '.join(['?'] * len(cols))
insert_sql = (
f"INSERT INTO codespeed_result ({', '.join(cols)}) VALUES ({ph})"
)
while True:
batch = pg.fetchmany(5000)
if not batch:
break
lite.executemany(
insert_sql,
[tuple(_conv(v) for v in row) for row in batch],
)
lite.commit()
if os.path.getsize(path) > SIZE_LIMIT:
break
finally:
lite.close()


@staff_member_required
def download_db(request):
fd, path = tempfile.mkstemp(suffix='.sqlite3')
os.close(fd)
try:
_build_sqlite(path)
f = open(path, 'rb')
today = datetime.today().strftime('%Y-%m-%d')
response = FileResponse(
f,
as_attachment=True,
filename=f'codespeed-{today}.sqlite3',
)
os.unlink(path) # unlink after FileResponse reads the file size
response.set_cookie(
'codespeed_download_ready', '1',
max_age=60, path='/', samesite='Lax',
)
return response
except Exception:
if os.path.exists(path):
os.unlink(path)
raise
9 changes: 6 additions & 3 deletions codespeed/commits/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ def getlogs(endrev, startrev):
else:
logfmt = '--format=format:%h%x00%H%x00%at%x00%an%x00%ae%x00%s%x00%b%x1e'

max_log_entries = getattr(settings, 'GIT_MAX_LOG_ENTRIES', 30)

cmd = ["git", "log", logfmt]

if endrev.commitid != startrev.commitid:
cmd.append("-n%d" % max_log_entries)
cmd.append("%s...%s" % (startrev.commitid, endrev.commitid))
else:
cmd.append("-1") # Only return one commit
Expand All @@ -64,8 +67,8 @@ def getlogs(endrev, startrev):
p, stdout, stderr = execute_command(cmd, working_copy)

if p.returncode != 0:
raise CommitLogError("%s returned %s: %s" % (
" ".join(cmd), p.returncode, stderr))
raise CommitLogError(f"'%s' in '%s' returned %s: %s" % (
" ".join(cmd), working_copy, p.returncode, stderr))
logs = []
for log in filter(None, stdout.split('\x1e')):
(short_commit_id, commit_id, date_t, author_name, author_email,
Expand All @@ -79,7 +82,7 @@ def getlogs(endrev, startrev):
logger.debug('Failed to get tag', exc_info=True)

tag = stdout.strip() if p.returncode == 0 else ""
date = datetime.datetime.fromtimestamp(
date = datetime.datetime.utcfromtimestamp(
int(date_t)).strftime("%Y-%m-%d %H:%M:%S")

logs.append({
Expand Down
2 changes: 1 addition & 1 deletion codespeed/commits/mercurial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
6 changes: 3 additions & 3 deletions codespeed/commits/tests/test_git.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime
from django.test import TestCase, override_settings
from mock import Mock, patch
from unittest.mock import Mock, patch

from codespeed.commits.git import getlogs
from codespeed.models import Project, Revision, Branch, Environment
Expand Down Expand Up @@ -48,7 +48,7 @@ def side_effect(cmd, *args, **kwargs):

# then
expected = {
'date': '2020-03-06 04:14:41',
'date': '2020-03-06 10:14:41',
'message': 'msg',
'commitid': 'long_id',
'author': 'author',
Expand All @@ -57,4 +57,4 @@ def side_effect(cmd, *args, **kwargs):
'short_commit_id': 'id',
'tag': 'tag',
}
self.assertEquals([expected], logs)
self.assertEqual([expected], logs)
2 changes: 1 addition & 1 deletion codespeed/fixtures/jruby.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions codespeed/fixtures/testdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
"fields": {
"name": "float",
"parent": null,
"benchmark_type": "C",
"source": "legacy",
"data_type": "U",
"description": "",
"units_title": "Time",
Expand All @@ -234,7 +234,7 @@
"fields": {
"name": "int",
"parent": null,
"benchmark_type": "C",
"source": "legacy",
"data_type": "U",
"description": "",
"units_title": "Time",
Expand Down
4 changes: 2 additions & 2 deletions codespeed/fixtures/timeline_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
"fields": {
"parent": null,
"name": "float",
"benchmark_type": "C",
"source": "legacy",
"default_on_comparison": true,
"units_title": "Time",
"units": "seconds",
Expand All @@ -224,7 +224,7 @@
"fields": {
"parent": null,
"name": "int",
"benchmark_type": "C",
"source": "legacy",
"default_on_comparison": true,
"units_title": "Time",
"units": "seconds",
Expand Down
File renamed without changes.
Empty file.
Loading
Loading