

def update_result(self, context):
    self.device.pull_file(self.cyclictest_result, context.output_directory)
    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, 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[sperator], RESULT_INTERPRETATION['P'])
                index = sperator.find('C')
                sperator = sperator.replace(sperator[index], RESULT_INTERPRETATION['C'])
                metrics = (sperator + remaing).split()
                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/VarMisuse@131/160 `index`->`sperator`