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
07801f3b
Commit
07801f3b
authored
Oct 06, 2016
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move performance from common to openedx/core
parent
256223d0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
lms/urls.py
+1
-1
openedx/core/djangoapps/performance/__init__.py
+0
-0
openedx/core/djangoapps/performance/tests/__init__.py
+0
-0
openedx/core/djangoapps/performance/tests/test_logs.py
+5
-2
openedx/core/djangoapps/performance/views/__init__.py
+5
-2
No files found.
lms/urls.py
View file @
07801f3b
...
...
@@ -33,7 +33,7 @@ urlpatterns = (
url
(
r'^email_confirm/(?P<key>[^/]*)$'
,
'student.views.confirm_email_change'
),
url
(
r'^event$'
,
'track.views.user_track'
),
url
(
r'^performance$'
,
'performance.views.performance_log'
),
url
(
r'^performance$'
,
'
openedx.core.djangoapps.
performance.views.performance_log'
),
url
(
r'^segmentio/event$'
,
'track.views.segmentio.segmentio_event'
),
# TODO: Is this used anymore? What is STATIC_GRAB?
...
...
common
/djangoapps/performance/__init__.py
→
openedx/core
/djangoapps/performance/__init__.py
View file @
07801f3b
File moved
common
/djangoapps/performance/tests/__init__.py
→
openedx/core
/djangoapps/performance/tests/__init__.py
View file @
07801f3b
File moved
common
/djangoapps/performance/tests/test_logs.py
→
openedx/core
/djangoapps/performance/tests/test_logs.py
View file @
07801f3b
"""Tests that performance data is successfully logged."""
# pylint: disable=no-member
"""
Tests that performance data is successfully logged.
"""
import
datetime
import
dateutil
import
json
...
...
@@ -8,7 +11,7 @@ from StringIO import StringIO
from
django.test
import
TestCase
from
django.test.client
import
RequestFactory
from
performance.views
import
performance_log
from
openedx.core.djangoapps.
performance.views
import
performance_log
class
PerformanceTrackingTest
(
TestCase
):
...
...
common
/djangoapps/performance/views/__init__.py
→
openedx/core
/djangoapps/performance/views/__init__.py
View file @
07801f3b
"""
Views for logging performance data.
"""
import
datetime
import
json
import
logging
...
...
@@ -7,7 +10,7 @@ from django.http import HttpResponse
from
track.utils
import
DateTimeJSONEncoder
perf
log
=
logging
.
getLogger
(
"perflog"
)
log
=
logging
.
getLogger
(
"perflog"
)
def
_get_request_header
(
request
,
header_name
,
default
=
''
):
...
...
@@ -49,6 +52,6 @@ def performance_log(request):
"host"
:
_get_request_header
(
request
,
'SERVER_NAME'
),
}
perf
log
.
info
(
json
.
dumps
(
event
,
cls
=
DateTimeJSONEncoder
))
log
.
info
(
json
.
dumps
(
event
,
cls
=
DateTimeJSONEncoder
))
return
HttpResponse
(
status
=
204
)
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