

def CollectResultFile(vm, results):
    'Collect result file on vm.\n\n  Args:\n    vm: The target vm.\n    results: A dictionary of lists. Each list contains results of a field\n       defined in RESULTS_METRICS collected from each loader machines.\n  '
    result_path = _ResultFilePath(vm)
    vm.PullFile(vm_util.GetTempDir(), result_path)
    (resp, _) = vm.RemoteCommand(('tail -n 20 ' + result_path))
    for metric in RESULTS_METRICS:
        value = regex_util.ExtractGroup(('%s[\\t ]+: ([\\d\\.:]+)' % metric), resp)
        if (metric == RESULTS_METRICS[(- 1)]):
            value = value.split(':')
            results[metric].append((((int(value[0]) * 3600) + (int(value[1]) * 60)) + int(value[2])))
        else:
            results[metric].append(float(value))

dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py CollectResultFile/original