コード例 #1
0
    def createFromName(name):
        """Scan the benchmark directory for the benchmark named 'name'
        and create a benchmark object for it."""
        bmkpath = path.join(globals.root, "benchmarks", name)
        descr = process.read_description_file(bmkpath)

        try:
            # Scan implementations of the benchmark
            impls = [BenchImpl.createFromName(name, impl) for impl in process.scan_for_benchmark_versions(bmkpath)]

            # Scan data sets of the benchmark
            datas = [BenchDataset.createFromName(name, data) for data in process.scan_for_benchmark_datasets(bmkpath)]

            # If no exception occurred, the benchmark is valid
            return Benchmark(name, bmkpath, impls, datas, descr)
        except Exception, e:
            return Benchmark(name, invalid=e)
コード例 #2
0
    def createFromName(name):
        """Scan the benchmark directory for the benchmark named 'name'
        and create a benchmark object for it."""
        bmkdir = globals.benchdir.getChildByName(name)
        datadir = globals.datadir.getChildByName(name)
        descr = process.read_description_file(bmkdir)

        try:
            # Scan implementations of the benchmark
            impls = [BenchImpl.createFromDir(impl) for impl in process.scan_for_benchmark_versions(bmkdir)]

            # Scan data sets of the benchmark
            datas = [BenchDataset.createFromDir(data) for data in process.scan_for_benchmark_datasets(datadir)]

            # If no exception occurred, the benchmark is valid
            return Benchmark(name, bmkdir.getPath(), impls, datas, descr)
        finally:
            pass
コード例 #3
0
    def createFromName(name):
        """Scan the benchmark directory for the benchmark named 'name'
        and create a benchmark object for it."""
        bmkdir = globals.benchdir.getChildByName(name)
        datadir = globals.datadir.getChildByName(name)
        descr = process.read_description_file(bmkdir)


        try:
            # Scan implementations of the benchmark
            impls = [BenchImpl.createFromDir(impl)
                     for impl in process.scan_for_benchmark_versions(bmkdir)]
            
            # Scan data sets of the benchmark
            datas = [BenchDataset.createFromDir(data)
                     for data in process.scan_for_benchmark_datasets(datadir)]

            # If no exception occurred, the benchmark is valid
            return Benchmark(name, bmkdir.getPath(), impls, datas, descr)
        finally:
            pass
コード例 #4
0
    def createFromName(name):
        """Scan the benchmark directory for the benchmark named 'name'
        and create a benchmark object for it."""
        bmkpath = path.join(globals.root, 'benchmarks', name)
        descr = process.read_description_file(bmkpath)

        try:
            # Scan implementations of the benchmark
            impls = [
                BenchImpl.createFromName(name, impl)
                for impl in process.scan_for_benchmark_versions(bmkpath)
            ]

            # Scan data sets of the benchmark
            datas = [
                BenchDataset.createFromName(name, data)
                for data in process.scan_for_benchmark_datasets(bmkpath)
            ]

            # If no exception occurred, the benchmark is valid
            return Benchmark(name, bmkpath, impls, datas, descr)
        except Exception, e:
            return Benchmark(name, invalid=e)