diff --git a/src/dashboard/js/common.js b/src/dashboard/js/common.js index 1b878ad..7b98097 100644 --- a/src/dashboard/js/common.js +++ b/src/dashboard/js/common.js @@ -35,5 +35,7 @@ var measures = { 'timetostableframe': { 'shortDesc': 'Time to first stable frame (seconds)', 'longDesc': 'The time to the first frame of the capture where the image is stable (i.e. mostly unchanging). This is a startup metric that indicates roughly when things have stopped loading. Lower values are better.' }, 'timetoresponse': { 'shortDesc': 'Time to visible response (seconds)', - 'longDesc': 'Time between event being first sent to device and an observable response. A long pause may indicate that the application is unresponsive.' } + 'longDesc': 'Time between event being first sent to device and an observable response. A long pause may indicate that the application is unresponsive.' }, + 'overallentropy': { 'shortDesc': 'Overall entropy over length of capture', + 'longDesc': 'Overall information content in frames of capture. Low values may indicate that some areas of the screen were left blank while the screen was redrawing. Higher values are generally better.' } } diff --git a/src/eideticker/eideticker/metrics.py b/src/eideticker/eideticker/metrics.py index 507a7d0..c1fe3be 100644 --- a/src/eideticker/eideticker/metrics.py +++ b/src/eideticker/eideticker/metrics.py @@ -45,6 +45,8 @@ def get_standard_metrics(capture, actions): capture, threshold=analysis_props['animation_threshold']) metrics['checkerboard'] = videocapture.get_checkerboarding_area_duration( capture) + metrics['overallentropy'] = videocapture.get_overall_entropy(capture) + if actions: # get the delta between the first non-sleep action being fired and # there being a visible change diff --git a/src/videocapture/videocapture/__init__.py b/src/videocapture/videocapture/__init__.py index 74a34f1..dce8a2c 100644 --- a/src/videocapture/videocapture/__init__.py +++ b/src/videocapture/videocapture/__init__.py @@ -6,6 +6,6 @@ from controller import CaptureController from capture import Capture, BadCapture from checkerboard import * from framediff import get_framediff_imgarray, get_framediff_image, get_framediff_sums, get_num_unique_frames, get_fps -from entropy import get_entropy_diffs, get_frame_entropies +from entropy import get_entropy_diffs, get_overall_entropy, get_frame_entropies from stableframe import get_stable_frame, get_stable_frame_time from options import OptionParser diff --git a/src/videocapture/videocapture/entropy.py b/src/videocapture/videocapture/entropy.py index abedb8a..9c10ef7 100644 --- a/src/videocapture/videocapture/entropy.py +++ b/src/videocapture/videocapture/entropy.py @@ -46,6 +46,9 @@ def get_frame_entropies(capture, sobelized=False): return cache[cachekey] +def get_overall_entropy(capture, sobelized=False): + return sum(get_frame_entropies(capture, sobelized=sobelized)) + def get_entropy_diffs(capture, num_samples=5, sobelized=False): prev_samples = [] entropies = get_frame_entropies(capture, sobelized=sobelized)