From 06b3110ea0db116631b1e1da90eef4e663b3dc39 Mon Sep 17 00:00:00 2001 From: Christine Lytwynec Date: Tue, 24 Mar 2015 17:16:37 -0400 Subject: [PATCH] onload performance beacon for LMS pages --- lms/envs/aws.py | 1 + lms/envs/common.py | 9 ++++++++- lms/templates/main.html | 30 ++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 38bb7b7e7c..8f3ab9ca9d 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -557,6 +557,7 @@ XBLOCK_SETTINGS = ENV_TOKENS.get('XBLOCK_SETTINGS', {}) ##### CDN EXPERIMENT/MONITORING FLAGS ##### CDN_VIDEO_URLS = ENV_TOKENS.get('CDN_VIDEO_URLS', CDN_VIDEO_URLS) +ONLOAD_BEACON_SAMPLE_RATE = ENV_TOKENS.get('ONLOAD_BEACON_SAMPLE_RATE', ONLOAD_BEACON_SAMPLE_RATE) ##### ECOMMERCE API CONFIGURATION SETTINGS ##### ECOMMERCE_API_URL = ENV_TOKENS.get('ECOMMERCE_API_URL', ECOMMERCE_API_URL) diff --git a/lms/envs/common.py b/lms/envs/common.py index 80b97bff69..7ea0fa32be 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -352,6 +352,9 @@ FEATURES = { # enable beacons for video timing statistics 'ENABLE_VIDEO_BEACON': False, + # enable beacons for lms onload event statistics + 'ENABLE_ONLOAD_BEACON': False, + # Certificates Web/HTML Views 'CERTIFICATES_HTML_VIEW': False, } @@ -2074,9 +2077,13 @@ SEARCH_ENGINE = None # Use the LMS specific result processor SEARCH_RESULT_PROCESSOR = "lms.lib.courseware_search.lms_result_processor.LmsSearchResultProcessor" -##### CDN EXPERIMENT/MONITORING FLAGS ##### +### PERFORMANCE EXPERIMENT SETTINGS ### +# CDN experiment/monitoring flags CDN_VIDEO_URLS = {} +# Page onload event sampling rate (min 0.0, max 1.0) +ONLOAD_BEACON_SAMPLE_RATE = 0.0 + # The configuration visibility of account fields. ACCOUNT_VISIBILITY_CONFIGURATION = { # Default visibility level for accounts without a specified value diff --git a/lms/templates/main.html b/lms/templates/main.html index 5fbc3dffcb..e82d0432db 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -182,3 +182,33 @@ ) ) if course_id and enrollment_action else "" } + +# Performance beacon for onload times +% if settings.FEATURES.get('ENABLE_ONLOAD_BEACON', False): + +% endif