예제 #1
0
    def run_test(self, settings, output_path, print_datafile_loc=False):
        settings = settings.copy()
        settings.load_test()
        res = resultset.new(settings)
        record_metadata(res, settings.EXTENDED_METADATA,
                        settings.REMOTE_METADATA)

        if not settings.HOSTS:
            raise RuntimeError("Must specify host (-H option).")

        logger.info("Starting %s test. Expected run time: %d seconds.",
                    settings.NAME, settings.TOTAL_LENGTH)

        self.agg = aggregators.new(settings)
        res = self.agg.postprocess(self.agg.aggregate(res))
        if self.killed:
            return
        record_postrun_metadata(res, settings.EXTENDED_METADATA,
                                settings.REMOTE_METADATA)
        res.dump_dir(output_path)
        logger.log(loggers.INFO if print_datafile_loc else loggers.DEBUG,
                   "Data file written to %s.", res.dump_filename)

        formatter = formatters.new(settings)
        formatter.format([res])

        self.tests_run += 1
예제 #2
0
파일: batch.py 프로젝트: tohojo/flent
    def run_test(self, settings, output_path, print_datafile_loc=False):
        settings = settings.copy()
        settings.load_test()
        res = resultset.new(settings)

        if settings.LOG_FILE is _LOG_DEFER:
            settings.LOG_FILE = res.dump_filename.replace(res.SUFFIX, ".log")
            loggers.setup_logfile(settings.LOG_FILE)

        record_metadata(res, settings.EXTENDED_METADATA,
                        settings.REMOTE_METADATA)

        if not settings.HOSTS:
            raise RuntimeError("Must specify host (-H option).")

        logger.info("Starting %s test. Expected run time: %d seconds.",
                    settings.NAME, settings.TOTAL_LENGTH)

        self.agg = aggregators.new(settings)
        res = self.agg.postprocess(self.agg.aggregate(res))
        if self.killed:
            return
        record_postrun_metadata(res, settings.EXTENDED_METADATA,
                                settings.REMOTE_METADATA)
        res.dump_dir(output_path)
        logger.log(loggers.INFO if print_datafile_loc else loggers.DEBUG,
                   "Data file written to %s.", res.dump_filename)

        formatter = formatters.new(settings)
        formatter.format([res])

        self.tests_run += 1
예제 #3
0
    def run_test(self, settings, output_path, print_datafile_loc=False):
        settings = settings.copy()
        settings.load_test()
        res = resultset.new(settings)
        if settings.EXTENDED_METADATA:
            record_extended_metadata(res, settings.REMOTE_METADATA)

        if not settings.HOSTS:
            raise RuntimeError("Must specify host (-H option).")

        self.agg = aggregators.new(settings)
        res = self.agg.postprocess(self.agg.aggregate(res))
        if self.killed:
            return
        if settings.EXTENDED_METADATA:
            record_postrun_metadata(res, settings.REMOTE_METADATA)
        res.dump_dir(output_path)
        if print_datafile_loc:
            sys.stderr.write("Data file written to %s.\n" % res.dump_file)

        formatter = formatters.new(settings)
        formatter.format([res])

        self.tests_run += 1
예제 #4
0
파일: batch.py 프로젝트: dtaht/flent
    def run_test(self, settings, output_path, print_datafile_loc=False):
        settings = settings.copy()
        settings.load_test()
        res = resultset.new(settings)
        if settings.EXTENDED_METADATA:
            record_extended_metadata(res, settings.REMOTE_METADATA)

        if not settings.HOSTS:
            raise RuntimeError("Must specify host (-H option).")

        self.agg = aggregators.new(settings)
        res = self.agg.postprocess(self.agg.aggregate(res))
        if self.killed:
            return
        if settings.EXTENDED_METADATA:
            record_postrun_metadata(res, settings.REMOTE_METADATA)
        res.dump_dir(output_path)
        if print_datafile_loc:
            sys.stderr.write("Data file written to %s.\n" % res.dump_filename)

        formatter = formatters.new(settings)
        formatter.format([res])

        self.tests_run += 1