def get_standard_metric_metadata(capture): return { 'framediffsums': videocapture.get_framediff_sums(capture), 'framesobelentropies': videocapture.get_frame_entropies(capture, sobelized=True) }
if baseline: datapoint.update({'baseline': True}) metrics = {} if testinfo['type'] == 'startup' or testinfo['type'] == 'webstartup' or \ testinfo['defaultMeasure'] == 'timetostableframe': metrics['timetostableframe'] = eideticker.get_stable_frame_time( capture) else: # standard test metrics metrics = eideticker.get_standard_metrics(capture, testlog.actions) datapoint.update(metrics) metadata['metrics'] = metrics metadata['frameDiffSums'] = videocapture.get_framediff_sums(capture) metadata['frameSobelEntropies'] = videocapture.get_frame_entropies( capture, sobelized=True) if enable_profiling: metadata['profile'] = profile_path # add logs (if any) to test metadata metadata.update(testlog.getdict()) # Add datapoint data['testdata'][productname][appdate].append(datapoint) # Dump metadata open(os.path.join(outputdir, 'metadata', '%s.json' % datapoint['uuid']), 'w').write(json.dumps(metadata)) # Write test data to disk immediately (so we don't lose it if we fail later)
if baseline: datapoint.update({'baseline': True}) metrics = {} if testinfo['type'] == 'startup' or testinfo['type'] == 'webstartup' or \ testinfo['defaultMeasure'] == 'timetostableframe': metrics['timetostableframe'] = eideticker.get_stable_frame_time( capture) else: # standard test metrics metrics = eideticker.get_standard_metrics(capture, testlog.actions) datapoint.update(metrics) metadata['metrics'] = metrics metadata['frameDiffSums'] = videocapture.get_framediff_sums(capture) metadata['frameSobelEntropies'] = videocapture.get_frame_entropies(capture, sobelized=True) if enable_profiling: metadata['profile'] = profile_path # add logs (if any) to test metadata metadata.update(testlog.getdict()) # Add datapoint data['testdata'][productname][appdate].append(datapoint) # Dump metadata open(os.path.join(outputdir, 'metadata', '%s.json' % datapoint['uuid']), 'w').write(json.dumps(metadata)) # Write test data to disk immediately (so we don't lose it if we fail later)
def get_standard_metric_metadata(capture): return { "framediffsums": videocapture.get_framediff_sums(capture), "framecannyentropies": videocapture.get_frame_entropies(capture, edge_detection="canny"), }
def get_standard_metric_metadata(capture): return { 'framediffsums': videocapture.get_framediff_sums(capture), 'framesobelentropies': videocapture.get_frame_entropies( capture, sobelized=True) }
def get_standard_metric_metadata(capture): return { 'framediffsums': videocapture.get_framediff_sums(capture), 'framecannyentropies': videocapture.get_frame_entropies( capture, edge_detection='canny') }