forked from django/djangobench
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed Unipath dependency as it claims to support Python 3, but has an open issue regarding Python 3 support <mikeorr/Unipath#10>. Removed argparse dependency as Python 2.7 and 3.2 included argparse in stdlib. Furthermore some PEP8 cleanups on the files touched.
- Loading branch information
Showing
13 changed files
with
240 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
from unipath import FSPath as Path | ||
import os | ||
|
||
from djangobench.base_settings import * | ||
|
||
USE_I18N = False | ||
USE_L10N = True | ||
|
||
TEMPLATE_DIRS = [Path(__file__).parent.child('templates').absolute()] | ||
TEMPLATE_DIRS = ( | ||
os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates')), | ||
) | ||
INSTALLED_APPS = ['l10n_render'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
from djangobench.utils import run_benchmark | ||
from query_select_related.models import Book | ||
|
||
|
||
def benchmark(): | ||
for i in xrange(20): | ||
for i in range(20): | ||
list(Book.objects.select_related('author')) | ||
|
||
run_benchmark( | ||
benchmark, | ||
meta = { | ||
meta={ | ||
'description': 'A simple Model.objects.select_related() call.', | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
from unipath import FSPath as Path | ||
import os | ||
|
||
from djangobench.base_settings import * | ||
|
||
INSTALLED_APPS = ['template_render'] | ||
TEMPLATE_DIRS = [Path(__file__).parent.child('templates').absolute()] | ||
TEMPLATE_DIRS = ( | ||
os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates')), | ||
) | ||
ROOT_URLCONF = 'template_render.urls' |
Oops, something went wrong.