コード例 #1
0
def Plot():
    with Cons.MT("Plotting ..."):
        env = os.environ.copy()
        env["FN_IN_LOCAL_SSD"] = CsvFile.GenDataFileForGnuplot(
            Conf.Manifest.Get("Local SSD"))
        env["FN_IN_EBS_GP2"] = CsvFile.GenDataFileForGnuplot(
            Conf.Manifest.Get("EBS gp2"))
        env["FN_IN_EBS_ST1"] = CsvFile.GenDataFileForGnuplot(
            Conf.Manifest.Get("EBS st1"))
        env["FN_IN_EBS_SC1"] = CsvFile.GenDataFileForGnuplot(
            Conf.Manifest.Get("EBS sc1"))
        fn_out = "%s/baseline-time-vs-resource-usage-all-stg-devs.pdf" % Conf.GetDir(
            "output_dir")
        env["FN_OUT"] = fn_out
        Util.RunSubp("gnuplot %s/res-usage.gnuplot" %
                     os.path.dirname(__file__),
                     env=env)
        Cons.P("Created %s %d" % (fn_out, os.path.getsize(fn_out)))
コード例 #2
0
ファイル: Plot.py プロジェクト: hobinyoon/mutant-misc
def _Cpu():
    with Cons.MT("Plotting cpu ..."):
        env = os.environ.copy()
        env["FN_IN"] = CsvFile.GenDataFileForGnuplot()
        dn = "%s/%s" % (Conf.GetDir("output_dir"),
                        Conf.Get("simulation_time_begin"))
        fn_out = "%s/cpu.pdf" % dn
        env["FN_OUT"] = fn_out
        with Cons.MT("Plotting ..."):
            Util.RunSubp("gnuplot %s/cpu.gnuplot" % os.path.dirname(__file__),
                         env=env)
            Cons.P("Created %s %d" % (fn_out, os.path.getsize(fn_out)))
コード例 #3
0
    def channels_from_trigger(self, binfilename, csvfilename):
        self.binfile = BF.BinFile(binfilename)
        self.binfile.open_bin()
        self.csvfile = CF.CsvFile(csvfilename)
        self.csvfile.open_csv()

        trigger_off = 0

        for i in range(1, len(self.binfile.data[0])):
            if self.binfile.data[2][i] < self.threshold and self.binfile.data[
                    2][i - 1] > self.threshold:
                trigger_off = i
                break

        signal = self.binfile.data[self.signal_channel][trigger_off:]
        timing = self.binfile.data[self.timing_channel][trigger_off:]

        self.start_time = trigger_off

        return signal, timing
コード例 #4
0
def mainGenerateReducedSuite(inputFile, number, outputFile):
    t = TestCoverageData(inputFile)
    subs = t.generateReducedSubsets(int(number))
    suiteCsv = CsvFile(subs)
    suiteCsv.writeCsvFile(outputFile)