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.result.add_metric(wkload.name + ' (single-threaded)',
                                      int(st_score))
            if mt_score is not None:
                scores_by_category[wkload.category].append(mt_score)
                context.result.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.result.add_metric(
                capitalize(category) + ' Score', int(category_score))
        context.result.add_metric('Geekbench Score', int(overall_score))
    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.result.add_metric(wkload.name + ' (single-threaded)', int(st_score))
            if mt_score is not None:
                scores_by_category[wkload.category].append(mt_score)
                context.result.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.result.add_metric(capitalize(category) + ' Score', int(category_score))
        context.result.add_metric('Geekbench Score', int(overall_score))
def generate_extension_documentation(source_dir, outdir, ignore_paths):
    loader = ExtensionLoader(keep_going=True)
    loader.clear()
    loader.update(paths=[source_dir], ignore_paths=ignore_paths)
    for ext_type in loader.extension_kinds:
        if not ext_type in GENERATE_FOR:
            continue
        outfile = os.path.join(outdir, '{}s.rst'.format(ext_type))
        with open(outfile, 'w') as wfh:
            wfh.write('.. _{}s:\n\n'.format(ext_type))
            wfh.write(underline(capitalize('{}s'.format(ext_type))))
            exts = loader.list_extensions(ext_type)
            for ext in sorted(exts, key=lambda x: x.name):
                wfh.write(get_rst_from_extension(ext))
Exemple #4
0
def generate_extension_documentation(source_dir, outdir, ignore_paths):
    loader = ExtensionLoader(keep_going=True)
    loader.clear()
    loader.update(paths=[source_dir], ignore_paths=ignore_paths)
    for ext_type in loader.extension_kinds:
        if not ext_type in GENERATE_FOR:
            continue
        outfile = os.path.join(outdir, '{}s.rst'.format(ext_type))
        with open(outfile, 'w') as wfh:
            wfh.write('.. _{}s:\n\n'.format(ext_type))
            wfh.write(underline(capitalize('{}s'.format(ext_type))))
            exts = loader.list_extensions(ext_type)
            for ext in sorted(exts, key=lambda x: x.name):
                wfh.write(get_rst_from_extension(ext))