示例#1
0
def get_standard_metric_metadata(capture):
    return {
        'framediffsums':
        videocapture.get_framediff_sums(capture),
        'framesobelentropies':
        videocapture.get_frame_entropies(capture, sobelized=True)
    }
示例#2
0
    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)
示例#4
0
def get_standard_metric_metadata(capture):
    return {
        "framediffsums": videocapture.get_framediff_sums(capture),
        "framecannyentropies": videocapture.get_frame_entropies(capture, edge_detection="canny"),
    }
示例#5
0
def get_standard_metric_metadata(capture):
    return { 'framediffsums': videocapture.get_framediff_sums(capture),
             'framesobelentropies': videocapture.get_frame_entropies(
            capture, sobelized=True) }
示例#6
0
def get_standard_metric_metadata(capture):
    return { 'framediffsums': videocapture.get_framediff_sums(capture),
             'framecannyentropies': videocapture.get_frame_entropies(
            capture, edge_detection='canny') }