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