def update_result(self, context):
        logcat_log = os.path.join(context.output_directory, 'logcat.log')
        self.device.dump_logcat(logcat_log)

        regex_time = re.compile("^I\/dex2oat \( *[0-9]+\): dex2oat took (?P<time>[0-9]+\.?[0-9]*)(?P<unit>m?s)")
        regex_comp_time = re.compile("^I\/dex2oat \( *[0-9]+\): +(?P<time>[0-9]*\.?[0-9]*)(?P<unit>m?s) Compile Dex File")
        time_data, comp_time_data = None, None
        with open(logcat_log) as fh:
            for line in fh:
                match = regex_time.search(line)

                if match:
                    time_data = match.groupdict()

                match = regex_comp_time.search(line)

                if match:
                    comp_time_data = match.groupdict()
        # Last dex2oat time wins.
        if time_data is not None:
            time = time_data['time']
            if time_data['unit'] == "s":
                time = float(time) * 1000.0
            context.result.add_metric('dex2oat_time', time, "ms", lower_is_better=True)

        if comp_time_data is not None:
            time = comp_time_data['time']
            if comp_time_data['unit'] == "s":
                time = float(time) * 1000.0
            context.result.add_metric('dex2oat_comp_time', time, "ms", lower_is_better=True)
::
dataset/ETHPy150Open ARM-software/workload-automation/wlauto/workloads/dex2oat/__init__.py/Dex2oatBenchmark.update_result--crossover with--dataset/ETHPy150Open sandrogauci/wafw00f/wafw00f/tests/test_main.py/WafW00FTestCase.test_iswest263cdn