Bug 973690 - Measure overall entropy over entire capture;r=mchang

This commit is contained in:
William Lachance 2014-03-03 12:56:33 -05:00
Родитель cae59238d3
Коммит b6ecbb54cd
4 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -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.' }
}

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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)