def ParseResults(results):
  samples = []
  start_index = results.find(RESULT_START_STRING)
  while start_index != -1:
    next_start_index = results.find(RESULT_START_STRING, start_index + 1)
    result = results[start_index: next_start_index]
    parallel_copies = regex_util.ExtractAllMatches(
        PARALLEL_COPIES_REGEX, result)
    parallel_copy_metadata = {'num_parallel_copies': int(parallel_copies[0])}

    match = regex_util.ExtractAllMatches(RESULT_REGEX, result)
    for groups in match:
      metadata = {'samples': int(groups[5]), 'time': groups[3] + groups[4]}
      metadata.update(parallel_copy_metadata)
      samples.append(sample.Sample(
          groups[0].strip(), float(groups[1]), groups[2], metadata))
    match = regex_util.ExtractAllMatches(SCORE_REGEX, result)
    for groups in match:
      metadata = {'baseline': float(groups[1]), 'index': float(groups[3])}
      metadata.update(parallel_copy_metadata)
      samples.append(sample.Sample('%s:score' % groups[0].strip(),
                                   value=float(groups[2]),
                                   unit='',
                                   metadata=metadata))
    match = regex_util.ExtractAllMatches(SYSTEM_SCORE_REGEX, result)
    samples.append(sample.Sample('System Benchmarks Index Score',
                                 float(match[0]), unit='',
                                 metadata=parallel_copy_metadata))
    start_index = next_start_index

  return samples
Find a compute node for live migration.
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/linux_benchmarks/unixbench_benchmark.py/ParseResults--crossover with--dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/nova/utils.py/NovaScenario._find_host_to_migrate