示例#1
0
def version_scanner():
    """version_scanner() -> (path -> pbf.Directory) 
    
    Return a function to find benchmark versions in the src 
    directory for the benchmark."""

    return lambda x: pbf.scan_file(x, True, lambda y: pbf.Directory(y), ['.svn'])
示例#2
0
    def create_dataset_dir(dpath):
        simple_scan = lambda x: pbf.scan_file(x)
        expected = [pbf.Directory(path.join(dpath,'input'), 
                              [_desc_file(path.join(dpath,'input'))], simple_scan),
                    pbf.Directory(path.join(dpath,'output'), [], simple_scan),
                    _desc_file(dpath)]

        return pbf.Directory(dpath, expected)
示例#3
0
def dataset_repo_scanner():
    """dataset_repo_scanner -> (path -> pbf.Directory)

    Returns a function which will scan a filename and create a pbf.Directory 
    for a folder containing a dataset repository for parboil benchmarks."""

    benchmark_dsets_scanner = lambda x: pbf.Directory(x, [], dataset_scanner())

    return lambda x: pbf.scan_file(x, True, benchmark_dsets_scanner)
示例#4
0
    def create_dataset_dir(dpath):
        simple_scan = lambda x: pbf.scan_file(x)
        expected = [
            pbf.Directory(path.join(dpath, 'input'),
                          [_desc_file(path.join(dpath, 'input'))],
                          simple_scan),
            pbf.Directory(path.join(dpath, 'output'), [], simple_scan),
            _desc_file(dpath)
        ]

        return pbf.Directory(dpath, expected)
示例#5
0
def dataset_scanner():
    """dataset_scanner -> (path -> pbf.Directory)

    Returns a function which will scan a filename and create a pbf.Directory
    for a folder containing datasets for the benchmark of the same name."""

    def create_dataset_dir(dpath):
        simple_scan = lambda x: pbf.scan_file(x)
        expected = [pbf.Directory(path.join(dpath,'input'), 
                              [_desc_file(path.join(dpath,'input'))], simple_scan),
                    pbf.Directory(path.join(dpath,'output'), [], simple_scan),
                    _desc_file(dpath)]

        return pbf.Directory(dpath, expected)

    return lambda x: pbf.scan_file(x, True, create_dataset_dir, ['.svn', '_darcs'])
示例#6
0
def benchmark_scanner():
    """benchmark_scanner -> (path -> pbf.Directory)

    Returns a function which will scan a filename and create a pbf.Directory 
    for a benchmark represented by that name."""

    def create_benchmark_dir(dpath):
        expected = [pbf.Directory(path.join(dpath,'src'), [], version_scanner()),
                    pbf.Directory(path.join(dpath,'tools'), 
                              [pbf.File(path.join(dpath,'compare-output'))]),
                    pbf.Directory(path.join(dpath,'build'), must_exist=False),
                    pbf.Directory(path.join(dpath,'run'), must_exist=False),
                    _desc_file(dpath)]
        return pbf.Directory(dpath, expected)

    return lambda x: pbf.scan_file(x, True, create_benchmark_dir,['_darcs','.svn'])
示例#7
0
def dataset_scanner():
    """dataset_scanner -> (path -> pbf.Directory)

    Returns a function which will scan a filename and create a pbf.Directory
    for a folder containing datasets for the benchmark of the same name."""

    def create_dataset_dir(dpath):
        simple_scan = lambda x: pbf.scan_file(x)
        expected = [pbf.Directory(path.join(dpath,'input'), 
                              [_desc_file(path.join(dpath,'input'))], simple_scan),
                    pbf.Directory(path.join(dpath,'output'), [], simple_scan),
                    _desc_file(dpath)]

        return pbf.Directory(dpath, expected)

    return lambda x: pbf.scan_file(x, True, create_dataset_dir, ['.svn', '_darcs'])
示例#8
0
def benchmark_scanner():
    """benchmark_scanner -> (path -> pbf.Directory)

    Returns a function which will scan a filename and create a pbf.Directory 
    for a benchmark represented by that name."""

    def create_benchmark_dir(dpath):
        expected = [pbf.Directory(path.join(dpath,'src'), [], version_scanner()),
                    pbf.Directory(path.join(dpath,'tools'), 
                              [pbf.File(path.join(dpath,'compare-output'))]),
                    pbf.Directory(path.join(dpath,'build'), must_exist=False),
                    pbf.Directory(path.join(dpath,'run'), must_exist=False),
                    _desc_file(dpath)]
        return pbf.Directory(dpath, expected)

    return lambda x: pbf.scan_file(x, True, create_benchmark_dir,['_darcs','.svn'])
def benchmark_scanner():
    """benchmark_scanner -> (path -> pbf.Directory)

    Returns a function which will scan a filename and create a pbf.Directory 
    for a benchmark represented by that name."""

    def create_benchmark_dir(dpath):
        expected = [
            pbf.Directory(path.join(dpath, "src"), [], version_scanner()),
            pbf.Directory(path.join(dpath, "tools"), [pbf.File(path.join(dpath, "compare-output"))]),
            pbf.Directory(path.join(dpath, "build"), must_exist=False),
            pbf.Directory(path.join(dpath, "run"), must_exist=False),
            _desc_file(dpath),
        ]
        return pbf.Directory(dpath, expected)

    return lambda x: pbf.scan_file(x, True, create_benchmark_dir, ["_darcs", ".svn"])