コード例 #1
0
ファイル: run_processor.py プロジェクト: parttimenerd/temci
 def print_report(self) -> str:
     if in_standalone_mode:
         return
     """ Print a short report if possible. """
     try:
         ReporterRegistry.get_for_name("console", self.stats_helper).report(with_tester_results=False)
     except:
         pass
コード例 #2
0
ファイル: run_processor.py プロジェクト: RaphaelKimmig/temci
 def print_report(self) -> str:
     if in_standalone_mode:
         return
     """ Print a short report if possible. """
     try:
         if len(self.stats_helper.valid_runs()) > 0 and \
                 all(x.benchmarks() > 0 for x in self.stats_helper.valid_runs()):
             ReporterRegistry.get_for_name("console", self.stats_helper).report(with_tester_results=False)
     except:
         pass
コード例 #3
0
ファイル: run_processor.py プロジェクト: jspam/temci
 def print_report(self) -> str:
     if in_standalone_mode:
         return
     """ Print a short report if possible. """
     try:
         if len(self.stats_helper.valid_runs()) > 0 and \
                 all(x.benchmarks() > 0 for x in self.stats_helper.valid_runs()):
             ReporterRegistry.get_for_name(
                 "console",
                 self.stats_helper).report(with_tester_results=False)
     except:
         pass
コード例 #4
0
ファイル: run_processor.py プロジェクト: RaphaelKimmig/temci
 def store_and_teardown(self):
     """
     Teardown everything, store the result file, print a short report and send an email
     if configured to do so.
     """
     if Settings().has_log_level("info") and self.show_report:
         self.print_report()
     self.teardown()
     self.store()
     if len(self.stats_helper.valid_runs()) > 0 \
             and all(x.benchmarks() > 0 for x in self.stats_helper.valid_runs()):
         report = ""
         if not in_standalone_mode:
             report = ReporterRegistry.get_for_name("console", self.stats_helper)\
                      .report(with_tester_results=False, to_string = True)
         self.stats_helper.valid_runs()[0].description()
         subject = "Finished " + join_strs([repr(run.description()) for run in self.stats_helper.valid_runs()])
         send_mail(Settings()["run/send_mail"], subject, report, [Settings()["run/out"]])
     if len(self.erroneous_run_blocks) > 0:
         descrs = []
         msgs = []
         for (i, result) in self.erroneous_run_blocks:
             descr = repr(RunData(attributes=self.runs[i]["attributes"]).description())
             descrs.append(descr)
             msg = descr + ":\n\t" + "\n\t".join(str(result.error).split("\n"))
             msgs.append(msg)
         subject = "Errors while benchmarking " + join_strs(descrs)
         send_mail(Settings()["run/send_mail"], subject, "\n\n".join(msgs), [Settings()["run/in"]  + ".erroneous.yaml"])
コード例 #5
0
ファイル: run_processor.py プロジェクト: parttimenerd/temci
 def store_and_teardown(self):
     """
     Teardown everything, store the result file, print a short report and send an email
     if configured to do so.
     """
     self.teardown()
     if not self.pool.run_driver.store_files:
         return
     self.store()
     if len(self.stats_helper.valid_runs()) > 0 \
             and all(x.benchmarks() > 0 for x in self.stats_helper.valid_runs()):
         report = ""
         if not in_standalone_mode:
             report = ReporterRegistry.get_for_name("console", self.stats_helper)\
                      .report(with_tester_results=False, to_string=True)
         subject = "Finished " + join_strs([repr(run.description()) for run in self.stats_helper.valid_runs()])
         send_mail(Settings()["run/send_mail"], subject, report, [Settings()["run/out"]])
     if self.recorded_error():
         descrs = []
         msgs = []
         for (i, result) in self.erroneous_run_blocks:
             descr = self.run_blocks[i].description()
             descrs.append(descr)
             msg = descr + ":\n\t" + "\n\t".join(str(result.error).split("\n"))
             msgs.append(msg)
         subject = "Errors while benchmarking " + join_strs(descrs)
         send_mail(Settings()["run/send_mail"], subject, "\n\n".join(msgs), [Settings()["run/in"] + ".erroneous.yaml"])
コード例 #6
0
ファイル: run_processor.py プロジェクト: parttimenerd/temci
 def render():
     f.reset()
     runs._last_line = ""
     runs.render_progress()
     f.advance_line()
     print(ReporterRegistry.get_for_name("console", self.stats_helper).report(
         with_tester_results=False, to_string=True), file=f)