Exemplo n.º 1
0
 def __init__(self, domain):
     self.domain = domain
     self.directory = os.path.join(BENCHMARKS_DIR, domain)
     problems = os.listdir(self.directory)
     problems = [p for p in problems if "domain" not in p
                 and not p.startswith(".")]
     tools.natural_sort(problems)
     self.problems = [Problem(domain, problem) for problem in problems]
Exemplo n.º 2
0
 def __init__(self, domain):
     self.domain = domain
     self.directory = os.path.join(BENCHMARKS_DIR, domain)
     problems = os.listdir(self.directory)
     problems = [
         p for p in problems if "domain" not in p and not p.startswith(".")
     ]
     tools.natural_sort(problems)
     self.problems = [Problem(domain, problem) for problem in problems]
Exemplo n.º 3
0
 def cols(self):
     if self._cols:
         return self._cols
     col_names = set()
     for row in self.values():
         col_names |= set(row.keys())
     self._cols = tools.natural_sort(col_names)
     return self._cols
    def __init__(self, parser=ReportArgParser()):
        parser.set_defaults(output_format='tex')
        parser.add_argument('focus', choices=SCORES,
                    help='the analyzed attribute (e.g. "expanded"). '
                        'The "attributes" parameter is ignored')
        parser.add_argument('--squeeze', action='store_true',
                            help='Use small fonts to fit in more data')
        parser.add_argument('--no-best', action='store_false',
                            dest='best_value_column',
                            help='Do not add a column with best known score')
        parser.add_argument('--page-size', choices=['a2', 'a3', 'a4'],
                            default='a4',
                            help='Set the page size for the latex report')
        Report.__init__(self, parser)

        self.extension = 'tex'
        self.name_parts.append(self.focus)

        self.focus_name = self.focus
        self.normalize = True

        self.score = 'score_' + self.focus
        if self.focus == 'coverage':
            self.focus = 'cost'
            self.score = 'coverage'
        elif self.focus == 'quality':
            self.focus = 'cost'
            self.score = 'quality'

        logging.info('Using score attribute "%s"' % self.score)
        logging.info('Adding column with best value: %s' %
                     self.best_value_column)

        # Get set of configs
        self.configs = tools.natural_sort(self.data.group_dict('config').keys())
        self.total_scores = self._compute_total_scores()
Exemplo n.º 5
0
 def rows(self):
     # Let the sum, etc. rows be the last ones
     return tools.natural_sort(self.keys())