Ejemplo n.º 1
0
def generate_appliances_instances(schema,
                                  tables,
                                  appliances,
                                  dataid,
                                  sample_rate=None,
                                  verbose=True):
    """
    Return an appliance instances from consecutive tables. Concatenates traces.
    """
    all_traces = [
        generate_appliances_traces(schema, table, appliances, dataid,
                                   sample_rate, verbose) for table in tables
    ]

    # transpose
    appliance_traces = list(zip(*all_traces))

    # concatenate by appliance
    appliance_traces = [
        utils.concatenate_traces(traces) for traces in appliance_traces
    ]
    return [
        ApplianceInstance([trace], trace.metadata)
        for trace in appliance_traces
    ]
def generate_appliance_instance(
        schema,tables,appliances,dataid,sample_rate=None,verbose=True):
    """
    Return an appliance instance from consecutive tables. Concatenates traces.
    """
    traces = [generate_appliance_trace(schema,table,appliances,dataid,
                  sample_rate,verbose) for table in tables]
    traces = [utils.concatenate_traces(traces)]
    return ApplianceInstance(traces,traces[0].metadata)
Ejemplo n.º 3
0
def generate_appliance_instance(schema,
                                tables,
                                appliances,
                                dataid,
                                sample_rate=None,
                                verbose=True):
    """
    Return an appliance instance from consecutive tables. Concatenates traces.
    """
    traces = [
        generate_appliance_trace(schema, table, appliances, dataid,
                                 sample_rate, verbose) for table in tables
    ]
    traces = [utils.concatenate_traces(traces)]
    return ApplianceInstance(traces, traces[0].metadata)
def generate_appliances_instances(
        schema,tables,appliances,dataid,sample_rate=None,verbose=True):
    """
    Return an appliance instances from consecutive tables. Concatenates traces.
    """
    all_traces = [generate_appliances_traces(schema,table,appliances,dataid,
                      sample_rate,verbose) for table in tables]

    # transpose
    appliance_traces = list(zip(*all_traces))

    # concatenate by appliance
    appliance_traces = [utils.concatenate_traces(traces)
                        for traces in appliance_traces]
    return [ApplianceInstance([trace],trace.metadata)
            for trace in appliance_traces]