def _GetTimeToBoot(vms, vm_index):
  """Creates a Sample for the boot time of a single VM.

  The boot time is the time difference from before the VM is created to when
  the VM is responsive to SSH commands.

  Args:
    vms: list of BaseVirtualMachine subclasses.
    vm_index: int. Index into vms that identifies the VM for which to calculate
        the boot time.

  Returns:
    Sample containing the boot time.
  """
  vm = vms[vm_index]
  metadata = {'num_cpus': vm.num_cpus, 'machine_instance': vm_index,
              'num_vms': len(vms), 'os_type': vm.OS_TYPE}
  metadata.update(vm.GetMachineTypeDict())
  assert vm.bootable_time
  assert vm.create_start_time
  assert vm.create_start_time >= vm.bootable_time
  value = vm.bootable_time - vm.create_start_time
  return sample.Sample('Boot Time', value, 'seconds', metadata)
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py/_GetTimeToBoot/swapped operands of `>=`