Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
b06d256f
Commit
b06d256f
authored
Jun 12, 2015
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear all caches before measure FieldOverride performance
parent
e4bc328c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
lms/djangoapps/ccx/tests/test_field_override_performance.py
+8
-8
No files found.
lms/djangoapps/ccx/tests/test_field_override_performance.py
View file @
b06d256f
...
@@ -8,6 +8,7 @@ import mock
...
@@ -8,6 +8,7 @@ import mock
from
courseware.views
import
progress
# pylint: disable=import-error
from
courseware.views
import
progress
# pylint: disable=import-error
from
datetime
import
datetime
from
datetime
import
datetime
from
django.conf
import
settings
from
django.core.cache
import
get_cache
from
django.core.cache
import
get_cache
from
django.test.client
import
RequestFactory
from
django.test.client
import
RequestFactory
from
django.test.utils
import
override_settings
from
django.test.utils
import
override_settings
...
@@ -124,10 +125,9 @@ class FieldOverridePerformanceTestCase(ProceduralCourseTestMixin,
...
@@ -124,10 +125,9 @@ class FieldOverridePerformanceTestCase(ProceduralCourseTestMixin,
# Switch to published-only mode to simulate the LMS
# Switch to published-only mode to simulate the LMS
with
self
.
settings
(
MODULESTORE_BRANCH
=
'published-only'
):
with
self
.
settings
(
MODULESTORE_BRANCH
=
'published-only'
):
# Clear the cache before measuring
# Clear all caches before measuring
# We clear the mongo_metadata_inheritance cache so that we can refill it
for
cache
in
settings
.
CACHES
:
# with published-only contents.
get_cache
(
cache
)
.
clear
()
get_cache
(
'mongo_metadata_inheritance'
)
.
clear
()
# Refill the metadata inheritance cache
# Refill the metadata inheritance cache
modulestore
()
.
get_course
(
self
.
course
.
id
,
depth
=
None
)
modulestore
()
.
get_course
(
self
.
course
.
id
,
depth
=
None
)
...
@@ -167,10 +167,10 @@ class TestFieldOverrideMongoPerformance(FieldOverridePerformanceTestCase):
...
@@ -167,10 +167,10 @@ class TestFieldOverrideMongoPerformance(FieldOverridePerformanceTestCase):
TEST_DATA
=
{
TEST_DATA
=
{
'no_overrides'
:
[
'no_overrides'
:
[
(
26
,
7
,
19
),
(
13
2
,
7
,
131
),
(
592
,
7
,
537
)
(
26
,
7
,
19
),
(
13
4
,
7
,
131
),
(
594
,
7
,
537
)
],
],
'ccx'
:
[
'ccx'
:
[
(
2
4
,
7
,
47
),
(
132
,
7
,
455
),
(
592
,
7
,
2037
)
(
2
6
,
7
,
47
),
(
134
,
7
,
455
),
(
594
,
7
,
2037
)
],
],
}
}
...
@@ -184,9 +184,9 @@ class TestFieldOverrideSplitPerformance(FieldOverridePerformanceTestCase):
...
@@ -184,9 +184,9 @@ class TestFieldOverrideSplitPerformance(FieldOverridePerformanceTestCase):
TEST_DATA
=
{
TEST_DATA
=
{
'no_overrides'
:
[
'no_overrides'
:
[
(
2
4
,
4
,
9
),
(
132
,
19
,
54
),
(
592
,
84
,
215
)
(
2
6
,
4
,
9
),
(
134
,
19
,
54
),
(
594
,
84
,
215
)
],
],
'ccx'
:
[
'ccx'
:
[
(
2
4
,
4
,
9
),
(
132
,
19
,
54
),
(
592
,
84
,
215
)
(
2
6
,
4
,
9
),
(
134
,
19
,
54
),
(
594
,
84
,
215
)
]
]
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment