Пример #1
0
def get_all_reader4(output, fmt):

    x = MDFreader(r'test.mf4')
    with Timer('Get all channels',
               'mdfreader {} mdfv4'.format(mdfreader_version), fmt) as timer:
        for s in x:
            x.getChannelData(s)
    output.send([timer.output, timer.error])
Пример #2
0
def save_reader3_nodata(output, fmt):

    x = MDFreader(r'test.mdf', noDataLoading=True)
    with Timer('Save file',
               'mdfreader {} noDataLoading mdfv3'.format(mdfreader_version),
               fmt) as timer:
        x.write(r'x.mdf')
    output.send([timer.output, timer.error])
Пример #3
0
def save_reader3(output, fmt):

    x = MDFreader(r'test.mdf')
    with Timer('Save file',
               'mdfreader {} mdfv3'.format(mdfreader_version),
               fmt) as timer:
        x.write(r'x.mdf')
    output.send([timer.output, timer.error])
Пример #4
0
def save_reader4_compression_bcolz(path, output, fmt):
    os.chdir(path)
    x = MDFreader(r'test.mf4', compression=6)
    with Timer('Save file',
               'mdfreader {} compress bcolz6 mdfv4'.format(mdfreader_version),
               fmt) as timer:
        x.write(r'x.mf4')
    output.send([timer.output, timer.error])
Пример #5
0
def save_reader4_nodata(path, output, fmt):
    os.chdir(path)
    x = MDFreader(r'test.mf4', noDataLoading=True)
    with Timer('Save file',
               'mdfreader {} noDataLoading mdfv4'.format(mdfreader_version),
               fmt) as timer:
        x.write(r'x.mf4')
    output.send([timer.output, timer.error])
Пример #6
0
def save_reader3_compression(path, output, fmt):
    os.chdir(path)
    x = MDFreader(r'test.mdf', compression='blosc')
    with Timer('Save file',
               'mdfreader {} compress mdfv3'.format(mdfreader_version),
               fmt) as timer:
        x.write(r'x.mdf')
    output.send([timer.output, timer.error])
Пример #7
0
def get_all_reader3(path, output, fmt):
    os.chdir(path)
    x = MDFreader(r'test.mdf')
    with Timer('Get all channels',
               'mdfreader {} mdfv3'.format(mdfreader_version), fmt) as timer:
        for s in x:
            x.getChannelData(s)
    output.send([timer.output, timer.error])
Пример #8
0
def save_reader4_compression(output, fmt):

    x = MDFreader(r'test.mf4', compression='blosc')
    with Timer('Save file',
               'mdfreader {} compress mdfv4'.format(mdfreader_version),
               fmt) as timer:
        x.write(r'x.mf4')
    output.send([timer.output, timer.error])
Пример #9
0
def get_all_reader3_nodata(output, fmt):

    x = MDFreader(r'test.mdf', noDataLoading=True)
    with Timer('Get all channels',
               'mdfreader {} nodata mdfv3'.format(mdfreader_version),
               fmt) as timer:
        for s in x:
            x.getChannelData(s)
    output.send([timer.output, timer.error])
Пример #10
0
def get_all_reader4_compression_bcolz(path, output, fmt):
    os.chdir(path)
    x = MDFreader(r'test.mf4', compression=6)
    with Timer('Get all channels',
               'mdfreader {} compress bcolz 6 mdfv4'.format(mdfreader_version),
               fmt) as timer:
        for s in x:
            x.getChannelData(s)
    output.send([timer.output, timer.error])
Пример #11
0
def get_all_reader4_nodata(path, output, fmt):
    os.chdir(path)
    x = MDFreader(r'test.mf4', noDataLoading=True)
    with Timer('Get all channels',
               'mdfreader {} nodata mdfv4'.format(mdfreader_version),
               fmt) as timer:
        for s in x:
            x.getChannelData(s)
    output.send([timer.output, timer.error])
Пример #12
0
def get_all_reader3_compression(output, fmt):

    x = MDFreader(r'test.mdf', compression='blosc')
    with Timer('Get all channels',
               'mdfreader {} compress mdfv3'.format(mdfreader_version),
               fmt) as timer:
        for s in x:
            x.getChannelData(s)

        with open('D:\\TMP\\f.txt', 'w') as f:
            f.write('OK')
    output.send([timer.output, timer.error])
Пример #13
0
def merge_reader_v4_compress(path, output, fmt):
    os.chdir(path)
    files = [r'test.mf4', ] * 2
    with Timer('Merge files',
               'mdfreader {} compress v4'.format(mdfreader_version),
               fmt) as timer:
        x1 = MDFreader(files[0], compression='blosc')
        x1.resample(0.01)
        x2 = MDFreader(files[1], compression='blosc')
        x2.resample(0.01)
        x1.mergeMdf(x2)
    output.send([timer.output, timer.error])
Пример #14
0
def merge_reader_v4(path, output, fmt):
    files = [r'test.mf4', ] * 2
    os.chdir(path)
    with Timer('Merge files',
               'mdfreader {} v4'.format(mdfreader_version),
               fmt) as timer:
        x1 = MDFreader(files[0])
        x1.resample(0.01)
        x2 = MDFreader(files[1])
        x2.resample(0.01)
        x1.mergeMdf(x2)
    output.send([timer.output, timer.error])
Пример #15
0
def merge_reader_v4_nodata(output, fmt):

    files = [
        r'test.mf4',
    ] * 3
    with Timer('Merge 3 files',
               'mdfreader {} nodata v4'.format(mdfreader_version),
               fmt) as timer:
        x1 = MDFreader(files[0], noDataLoading=True)
        x1.resample(0.01)
        x2 = MDFreader(files[1], noDataLoading=True)
        x2.resample(0.01)
        x1.mergeMdf(x2)

    output.send([timer.output, timer.error])
Пример #16
0
def get_all_reader3_nodata():
    os.chdir(path)
    x = MDFreader(r'test.mdf', noDataLoading=True)
    with Timer('mdfreader {} nodata mdfv3'.format(mdfreader_version)):
        for s in x:
            y = x.getChannelData(s)
Пример #17
0
def save_reader3_nodata():
    os.chdir(path)
    x = MDFreader(r'test.mdf', noDataLoading=True)
    with Timer('mdfreader {} noDataLoading mdfv3'.format(mdfreader_version)):
        x.write(r'x.mdf')
Пример #18
0
def get_all_reader3():
    os.chdir(path)
    x = MDFreader(r'test.mdf')
    with Timer('mdfreader {} mdfv3'.format(mdfreader_version)):
        for s in x:
            y = x.getChannelData(s)
Пример #19
0
def save_reader3():
    os.chdir(path)
    x = MDFreader(r'test.mdf')
    with Timer('mdfreader {} mdfv3'.format(mdfreader_version)):
        x.write(r'x.mdf')
Пример #20
0
def save_reader3_compression():
    os.chdir(path)
    x = MDFreader(r'test.mdf', compression='blosc')
    with Timer('mdfreader {} compression mdfv3'.format(mdfreader_version)):
        x.write(r'x.mdf')
Пример #21
0
def save_reader3_compression_bcolz():
    os.chdir(path)
    x = MDFreader(r'test.mdf', compression=6)
    with Timer('mdfreader {} compression bcolz 6 mdfv3'.format(
            mdfreader_version)):
        x.write(r'x.mdf')
Пример #22
0
def merge_reader_v3(output, fmt):

    files = [
        r'test.mdf',
    ] * 3
    with Timer('Merge 3 files', 'mdfreader {} v3'.format(mdfreader_version),
               fmt) as timer:
        x1 = MDFreader(files[0])
        x1.resample(0.01)
        x2 = MDFreader(files[1])
        x2.resample(0.01)
        x1.mergeMdf(x2)
        x2 = MDFreader(files[2])
        x2.resample(0.01)
        x1.mergeMdf(x2)
    output.send([timer.output, timer.error])
Пример #23
0
def merge_reader_v4_compress(output, fmt, size):

    files = [
        r'test.mf4',
    ] * 3
    with Timer('Merge 3 files',
               'mdfreader {} compress v4'.format(mdfreader_version),
               fmt) as timer:
        x1 = MDFreader(files[0], compression='blosc')
        x1.resample(0.01)
        x2 = MDFreader(files[1], compression='blosc')
        x2.resample(0.01)
        x1.mergeMdf(x2)
        x2 = MDFreader(files[2])
        x2.resample(0.01)
        x1.mergeMdf(x2)
    output.send([timer.output, timer.error])
Пример #24
0
def get_all_reader3_compression():
    os.chdir(path)
    x = MDFreader(r'test.mdf', compression='blosc')
    with Timer('mdfreader {} compression mdfv3'.format(mdfreader_version)):
        for s in x:
            y = x.getChannelData(s)