Ejemplo n.º 1
0
    def update_results(self, context):
        """
        http://support.primatelabs.com/kb/geekbench/interpreting-geekbench-2-scores
        From the website:
        Each workload's performance is compared against a baseline to determine a score. These
        scores are averaged together to determine an overall, or Geekbench, score for the system.
        Geekbench uses the 2003 entry-level Power Mac G5 as the baseline with a score of 1,000
        points. Higher scores are better, with double the score indicating double the performance.
        Geekbench provides three different kinds of scores:
            :Workload Scores: Each time a workload is executed Geekbench calculates a score based
                              on the computer's performance compared to the baseline
                              performance. There can be multiple workload scores for the
                              same workload as Geekbench can execute each workload multiple
                              times with different settings. For example, the "Dot Product"
                              workload is executed four times (single-threaded scalar code,
                              multi-threaded scalar code, single-threaded vector code, and
                              multi-threaded vector code) producing four "Dot Product" scores.
            :Section Scores: A section score is the average of all the workload scores for
                             workloads that are part of the section. These scores are useful
                             for determining the performance of the computer in a particular
                             area. See the section descriptions above for a summary on what
                             each section measures.
            :Geekbench Score: The Geekbench score is the weighted average of the four section
                              scores. The Geekbench score provides a way to quickly compare
                              performance across different computers and different platforms
                              without getting bogged down in details.
        """
        scores_by_category = defaultdict(list)
        for wkload in self.workloads:
            st_score, mt_score = wkload.get_scores()
            scores_by_category[wkload.category].append(st_score)
            context.add_metric(wkload.name + ' (single-threaded)',
                               int(st_score))
            if mt_score is not None:
                scores_by_category[wkload.category].append(mt_score)
                context.add_metric(wkload.name + ' (multi-threaded)',
                                   int(mt_score))

        overall_score = 0
        for category in scores_by_category:
            scores = scores_by_category[category]
            category_score = sum(scores) / len(scores)
            overall_score += category_score * self.category_weights[category]
            context.add_metric(
                capitalize(category) + ' Score', int(category_score))
        context.add_metric('Geekbench Score', int(overall_score))
Ejemplo n.º 2
0
    def update_results(self, context):
        """
        http://support.primatelabs.com/kb/geekbench/interpreting-geekbench-2-scores
        From the website:
        Each workload's performance is compared against a baseline to determine a score. These
        scores are averaged together to determine an overall, or Geekbench, score for the system.
        Geekbench uses the 2003 entry-level Power Mac G5 as the baseline with a score of 1,000
        points. Higher scores are better, with double the score indicating double the performance.
        Geekbench provides three different kinds of scores:
            :Workload Scores: Each time a workload is executed Geekbench calculates a score based
                              on the computer's performance compared to the baseline
                              performance. There can be multiple workload scores for the
                              same workload as Geekbench can execute each workload multiple
                              times with different settings. For example, the "Dot Product"
                              workload is executed four times (single-threaded scalar code,
                              multi-threaded scalar code, single-threaded vector code, and
                              multi-threaded vector code) producing four "Dot Product" scores.
            :Section Scores: A section score is the average of all the workload scores for
                             workloads that are part of the section. These scores are useful
                             for determining the performance of the computer in a particular
                             area. See the section descriptions above for a summary on what
                             each section measures.
            :Geekbench Score: The Geekbench score is the weighted average of the four section
                              scores. The Geekbench score provides a way to quickly compare
                              performance across different computers and different platforms
                              without getting bogged down in details.
        """
        scores_by_category = defaultdict(list)
        for wkload in self.workloads:
            st_score, mt_score = wkload.get_scores()
            scores_by_category[wkload.category].append(st_score)
            context.add_metric(wkload.name + ' (single-threaded)', int(st_score))
            if mt_score is not None:
                scores_by_category[wkload.category].append(mt_score)
                context.add_metric(wkload.name + ' (multi-threaded)', int(mt_score))

        overall_score = 0
        for category in scores_by_category:
            scores = scores_by_category[category]
            category_score = sum(scores) / len(scores)
            overall_score += category_score * self.category_weights[category]
            context.add_metric(capitalize(category) + ' Score', int(category_score))
        context.add_metric('Geekbench Score', int(overall_score))
Ejemplo n.º 3
0
def generate_plugin_documentation(source_dir, outdir, ignore_paths):
    pluginloader.clear()
    pluginloader.update(packages=GENERATE_FOR_PACKAGES)
    if not os.path.exists(outdir):
        os.mkdir(outdir)

    for ext_type in pluginloader.kinds:
        outfile = os.path.join(outdir, '{}s.rst'.format(ext_type))
        with open(outfile, 'w') as wfh:
            wfh.write('.. _{}s:\n\n'.format(ext_type.replace('_', '-')))
            title = ' '.join([capitalize(w) for w in ext_type.split('_')])
            wfh.write(underline('{}s'.format(title)))
            wfh.write(insert_contents_table())
            wfh.write(line_break())
            exts = pluginloader.list_plugins(ext_type)
            sorted_exts = iter(sorted(exts, key=lambda x: x.name))
            try:
                wfh.write(get_rst_from_plugin(sorted_exts.next()))
            except StopIteration:
                return
            for ext in sorted_exts:
                wfh.write(line_break())
                wfh.write(get_rst_from_plugin(ext))