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
69e3385c
Commit
69e3385c
authored
Nov 05, 2015
by
John Eskew
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9920 from edx/jeskew/report_request_response_times
Add response times to get_many/set_many/delete_many.
parents
f4cdf026
ac05012d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
lms/djangoapps/courseware/user_state_client.py
+9
-1
No files found.
lms/djangoapps/courseware/user_state_client.py
View file @
69e3385c
...
...
@@ -169,7 +169,9 @@ class DjangoXBlockUserStateClient(XBlockUserStateClient):
# The rest of this method exists only to submit DataDog events.
# Remove it once we're no longer interested in the data.
finish_time
=
time
()
self
.
_ddog_histogram
(
evt_time
,
'get_many.blks_out'
,
block_count
)
self
.
_ddog_histogram
(
evt_time
,
'get_many.response_time'
,
(
finish_time
-
evt_time
)
*
1000
)
@donottrack
(
StudentModule
,
StudentModuleHistory
)
def
set_many
(
self
,
username
,
block_keys_to_state
,
scope
=
Scope
.
user_state
):
...
...
@@ -243,8 +245,10 @@ class DjangoXBlockUserStateClient(XBlockUserStateClient):
num_fields_updated
=
max
(
0
,
len
(
state
)
-
num_new_fields_set
)
self
.
_ddog_histogram
(
evt_time
,
'set_many.fields_updated'
,
num_fields_updated
)
# Event for the entire set_many call.
# Events for the entire set_many call.
finish_time
=
time
()
self
.
_ddog_histogram
(
evt_time
,
'set_many.blks_updated'
,
len
(
block_keys_to_state
))
self
.
_ddog_histogram
(
evt_time
,
'set_many.response_time'
,
(
finish_time
-
evt_time
)
*
1000
)
@donottrack
(
StudentModule
,
StudentModuleHistory
)
def
delete_many
(
self
,
username
,
block_keys
,
scope
=
Scope
.
user_state
,
fields
=
None
):
...
...
@@ -283,6 +287,10 @@ class DjangoXBlockUserStateClient(XBlockUserStateClient):
# We just read this object, so we know that we can do an update
student_module
.
save
(
force_update
=
True
)
# Event for the entire delete_many call.
finish_time
=
time
()
self
.
_ddog_histogram
(
evt_time
,
'delete_many.response_time'
,
(
finish_time
-
evt_time
)
*
1000
)
@donottrack
(
StudentModule
,
StudentModuleHistory
)
def
get_history
(
self
,
username
,
block_key
,
scope
=
Scope
.
user_state
):
"""
...
...
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