def update_result(self, context):
        self.device.pull_file(self.cyclictest_result, context.output_directory)

        # Parsing the output
        # Standard Cyclictest Output:
        # T: 0 (31974) P:95 I:1000 C:4990 Min:9 Act:37 Avg:31 Max:59
        with open(os.path.join(context.output_directory, TXT_RESULT_NAME)) as f:
            for line in f:
                if line.find('C:') is not -1:
                    # Key = T: 0 (31974) P:95 I:1000
                    # Remaing = 49990 Min:9 Act:37 Avg:31 Max:59
                    # sperator = C:
                    (key, sperator, remaing) = line.partition('C:')

                    index = key.find('T')
                    key = key.replace(key[index], RESULT_INTERPRETATION['T'])
                    index = key.find('P')
                    key = key.replace(key[index], RESULT_INTERPRETATION['P'])

                    index = sperator.find('C')
                    sperator = sperator.replace(sperator[index], RESULT_INTERPRETATION['C'])

                    metrics = (sperator + remaing).split()
                    # metrics is now in the from of ['Min:', '9', 'Act:', '37', 'Avg:', '31' , 'Max', '59']
                    for i in range(0, len(metrics), 2):
                        full_key = key + ' ' + metrics[i][:-1]
                        value = int(metrics[i + 1])
                        context.result.add_metric(full_key, value, 'microseconds')
dataset/ETHPy150Open ARM-software/workload-automation/wlauto/workloads/cyclictest/__init__.py/Cyclictest.update_result/original