code stringlengths 66 870k | docstring stringlengths 19 26.7k | func_name stringlengths 1 138 | language stringclasses 1
value | repo stringlengths 7 68 | path stringlengths 5 324 | url stringlengths 46 389 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
def DeployContainerService(
self, name: str, container_spec: container_spec_lib.ContainerSpec
):
"""Deploys a ContainerSerivice according to the ContainerSpec."""
service = KubernetesContainerService(container_spec, name)
self.services[name] = service
service.Create() | Deploys a ContainerSerivice according to the ContainerSpec. | DeployContainerService | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/container_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/container_service.py | Apache-2.0 |
def node_memory_allocatable(self) -> units.Quantity:
"""Usable memory of each node in cluster in KiB."""
stdout, _, _ = RunKubectlCommand(
# TODO(pclay): Take a minimum of all nodes?
['get', 'nodes', '-o', 'jsonpath={.items[0].status.allocatable.memory}']
)
return units.ParseExpression(s... | Usable memory of each node in cluster in KiB. | node_memory_allocatable | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/container_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/container_service.py | Apache-2.0 |
def node_num_cpu(self) -> int:
"""vCPU of each node in cluster."""
stdout, _, _ = RunKubectlCommand(
['get', 'nodes', '-o', 'jsonpath={.items[0].status.capacity.cpu}']
)
return int(stdout) | vCPU of each node in cluster. | node_num_cpu | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/container_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/container_service.py | Apache-2.0 |
def DeployIngress(self, name: str, namespace: str, port: int) -> str:
"""Deploys an Ingress/load balancer resource to the cluster.
Args:
name: The name of the Ingress resource.
namespace: The namespace of the resource.
port: The port to expose to the internet.
Returns:
The address ... | Deploys an Ingress/load balancer resource to the cluster.
Args:
name: The name of the Ingress resource.
namespace: The namespace of the resource.
port: The port to expose to the internet.
Returns:
The address of the Ingress.
| DeployIngress | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/container_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/container_service.py | Apache-2.0 |
def _GetAddressFromIngress(self, ingress_out: str):
"""Gets the endpoint address from the Ingress resource."""
ingress = json.loads(ingress_out.strip("'"))
if 'ip' in ingress:
ip = ingress['ip']
elif 'hostname' in ingress:
ip = ingress['hostname']
else:
raise errors.Benchmarks.RunE... | Gets the endpoint address from the Ingress resource. | _GetAddressFromIngress | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/container_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/container_service.py | Apache-2.0 |
def Decode(self, value, component_full_name, flag_values):
"""Decodes memory size in MiB from a string.
The value specified in the config must be a string representation of the
memory size expressed in MiB or GiB. It must be an integer number of MiB
Examples: "1280MiB", "7.5GiB".
Args:
value... | Decodes memory size in MiB from a string.
The value specified in the config must be a string representation of the
memory size expressed in MiB or GiB. It must be an integer number of MiB
Examples: "1280MiB", "7.5GiB".
Args:
value: The value specified in the config.
component_full_name: st... | Decode | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/custom_virtual_machine_spec.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/custom_virtual_machine_spec.py | Apache-2.0 |
def _GetOptionDecoderConstructions(cls):
"""Gets decoder classes and constructor args for each configurable option.
Returns:
dict. Maps option name string to a (ConfigOptionDecoder class, dict) pair.
The pair specifies a decoder class and its __init__() keyword
arguments to construct ... | Gets decoder classes and constructor args for each configurable option.
Returns:
dict. Maps option name string to a (ConfigOptionDecoder class, dict) pair.
The pair specifies a decoder class and its __init__() keyword
arguments to construct in order to decode the named option.
| _GetOptionDecoderConstructions | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/custom_virtual_machine_spec.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/custom_virtual_machine_spec.py | Apache-2.0 |
def Decode(self, value, component_full_name, flag_values):
"""Decodes the machine_type option of a VM config.
Args:
value: Either a string name of a machine type or a dict containing 'cpu'
and 'memory' keys describing a custom VM.
component_full_name: string. Fully qualified name of the con... | Decodes the machine_type option of a VM config.
Args:
value: Either a string name of a machine type or a dict containing 'cpu'
and 'memory' keys describing a custom VM.
component_full_name: string. Fully qualified name of the configurable
component containing the config option.
fl... | Decode | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/custom_virtual_machine_spec.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/custom_virtual_machine_spec.py | Apache-2.0 |
def Decode(self, value, component_full_name, flag_values):
"""Decodes the machine_type option of a VM config.
Args:
value: Either a string name of a machine type or a dict containing
'compute_units' and 'tier' keys describing a machine type.
component_full_name: string. Fully qualified name... | Decodes the machine_type option of a VM config.
Args:
value: Either a string name of a machine type or a dict containing
'compute_units' and 'tier' keys describing a machine type.
component_full_name: string. Fully qualified name of the configurable
component containing the config optio... | Decode | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/custom_virtual_machine_spec.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/custom_virtual_machine_spec.py | Apache-2.0 |
def _ApplyFlags(cls, config_values, flag_values):
"""Modifies config options based on runtime flag values.
Can be overridden by derived classes to add support for specific flags.
Args:
config_values: dict mapping config option names to provided values. May be
modified by this function.
... | Modifies config options based on runtime flag values.
Can be overridden by derived classes to add support for specific flags.
Args:
config_values: dict mapping config option names to provided values. May be
modified by this function.
flag_values: flags.FlagValues. Runtime flags that may ov... | _ApplyFlags | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/custom_virtual_machine_spec.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/custom_virtual_machine_spec.py | Apache-2.0 |
def GetDataDiscoveryServiceClass(
cloud, service_type
) -> type['BaseDataDiscoveryService']:
"""Gets the underlying Data Discovery Service class."""
return typing.cast(
type[BaseDataDiscoveryService],
resource.GetResourceClass(
BaseDataDiscoveryService, CLOUD=cloud, SERVICE_TYPE=service_ty... | Gets the underlying Data Discovery Service class. | GetDataDiscoveryServiceClass | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/data_discovery_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/data_discovery_service.py | Apache-2.0 |
def GenerateRandomDbPassword():
"""Generate a strong random password.
# pylint: disable=line-too-long
Reference:
https://docs.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver15
# pylint: enable=line-too-long
Returns:
A random database password.
"""
prefix ... | Generate a strong random password.
# pylint: disable=line-too-long
Reference:
https://docs.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver15
# pylint: enable=line-too-long
Returns:
A random database password.
| GenerateRandomDbPassword | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/db_util.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/db_util.py | Apache-2.0 |
def GetDiskSpecClass(cloud, disk_type):
"""Get the DiskSpec class corresponding to 'cloud'."""
spec_class = spec.GetSpecClass(BaseDiskSpec, CLOUD=cloud, DISK_TYPE=disk_type)
# GetSpecClass will return base spec if failed
if spec_class is BaseDiskSpec:
return spec.GetSpecClass(BaseDiskSpec, CLOUD=cloud)
re... | Get the DiskSpec class corresponding to 'cloud'. | GetDiskSpecClass | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk.py | Apache-2.0 |
def mount_options(self):
"""Returns options to mount a disk.
The default value 'discard' is from the linux VM's MountDisk method.
See `man 8 mount` for usage. For example, returning "ro" will cause the
mount command to be "mount ... -o ro ..." mounting the disk as read only.
"""
opts = DEFAUL... | Returns options to mount a disk.
The default value 'discard' is from the linux VM's MountDisk method.
See `man 8 mount` for usage. For example, returning "ro" will cause the
mount command to be "mount ... -o ro ..." mounting the disk as read only.
| mount_options | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk.py | Apache-2.0 |
def fstab_options(self):
"""Returns options to use in the /etc/fstab entry for this drive.
The default value 'defaults' is from the linux VM's MountDisk method.
See `man fstab` for usage.
"""
opts = DEFAULT_FSTAB_OPTIONS
if FLAGS.fstab_options:
opts = ','.join(FLAGS.fstab_options)
se... | Returns options to use in the /etc/fstab entry for this drive.
The default value 'defaults' is from the linux VM's MountDisk method.
See `man fstab` for usage.
| fstab_options | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk.py | Apache-2.0 |
def __init__(self, disk_spec, disks):
"""Initializes a StripedDisk object.
Args:
disk_spec: A BaseDiskSpec containing the desired mount point.
disks: A list of BaseDisk objects that constitute the StripedDisk.
"""
super().__init__(disk_spec)
self.disks = disks
self.metadata = disks[... | Initializes a StripedDisk object.
Args:
disk_spec: A BaseDiskSpec containing the desired mount point.
disks: A list of BaseDisk objects that constitute the StripedDisk.
| __init__ | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk.py | Apache-2.0 |
def _GetNetworkDiskMountOptionsDict(self):
"""Default NFS mount options as a dict."""
options = {
'hard' if self.nfs_timeout_hard else 'soft': None,
'rsize': self.nfs_rsize,
'wsize': self.nfs_wsize,
'timeo': self.nfs_timeout * 10, # in decaseconds
'retrans': self.nfs_ret... | Default NFS mount options as a dict. | _GetNetworkDiskMountOptionsDict | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk.py | Apache-2.0 |
def _GetNetworkDiskMountOptionsDict(self):
"""Default SMB mount options as a dict."""
options = {
'vers': self.smb_version,
'username': self.storage_account_and_key['user'],
'password': self.storage_account_and_key['pw'],
'dir_mode': '0777',
'file_mode': '0777',
'... | Default SMB mount options as a dict. | _GetNetworkDiskMountOptionsDict | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk.py | Apache-2.0 |
def _ValidateStorageType(self):
"""Validate storage type for given _provider, set to default if not given.
Raises:
InvalidStorageTypeError: Incorrect storage type given.
TODO: When support other types of storage types (i.e. when this class
supports ebs-piops for AWS or pd-hhd for gcp), will need... | Validate storage type for given _provider, set to default if not given.
Raises:
InvalidStorageTypeError: Incorrect storage type given.
TODO: When support other types of storage types (i.e. when this class
supports ebs-piops for AWS or pd-hhd for gcp), will need to update
VALID_STORAGE_TYPES in C... | _ValidateStorageType | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_iops_to_capacity.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_iops_to_capacity.py | Apache-2.0 |
def _ValidateProvider(self):
"""Validate provider to be GCP or AWS, throw exception if invalid.
Raises:
InvalidProviderError: Incorrect provider type given.
"""
if self._provider not in list(CLOUD_PROVIDERS_INFO.keys()):
raise InvalidProviderError(
'Provider given is not supported... | Validate provider to be GCP or AWS, throw exception if invalid.
Raises:
InvalidProviderError: Incorrect provider type given.
| _ValidateProvider | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_iops_to_capacity.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_iops_to_capacity.py | Apache-2.0 |
def _SetSize(self):
"""Set minimum size (GB) necessary to achieve _iops level.
Rating performance levels as of May 2017, sources found below.
GCP: ratings from https://cloud.google.com/compute/docs/disks/. Storage can
go as high as 64TB per disk but IOPS maxes out at 30,000 iops/disk
or... | Set minimum size (GB) necessary to achieve _iops level.
Rating performance levels as of May 2017, sources found below.
GCP: ratings from https://cloud.google.com/compute/docs/disks/. Storage can
go as high as 64TB per disk but IOPS maxes out at 30,000 iops/disk
or (1000GB).
AWS: ratings... | _SetSize | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_iops_to_capacity.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_iops_to_capacity.py | Apache-2.0 |
def _SetCPUCount(self):
"""Set cpu count.
GCP: ratings from
https://cloud.google.com/compute/docs/disks/performance#ssd-pd-performance
AWS: to achieve good performance on EBS, one needs to use an
EBS-optimized VM instance, and the smallest VM instance that can be EBS
optimized is *.large VM typ... | Set cpu count.
GCP: ratings from
https://cloud.google.com/compute/docs/disks/performance#ssd-pd-performance
AWS: to achieve good performance on EBS, one needs to use an
EBS-optimized VM instance, and the smallest VM instance that can be EBS
optimized is *.large VM types (e.g., c4.large), those come... | _SetCPUCount | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_iops_to_capacity.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_iops_to_capacity.py | Apache-2.0 |
def _SetNumberDisks(self):
"""Set number of disks.
GCP: Adding disks does not increase IOPS for GCP.
AWS: ratings from https://aws.amazon.com/ebs/details/
"""
if self._provider == GCP:
self._number_disks = 1
elif self._provider == AWS:
self._number_disks = max(int(math.ceil(self._io... | Set number of disks.
GCP: Adding disks does not increase IOPS for GCP.
AWS: ratings from https://aws.amazon.com/ebs/details/
| _SetNumberDisks | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_iops_to_capacity.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_iops_to_capacity.py | Apache-2.0 |
def GetNonBootDiskCount(vm) -> int:
"""Returns the number of non boot disks attached to the VM."""
stdout, stderr = vm.RemoteCommand('lsblk --json', ignore_failure=True)
if not stdout:
logging.error(stderr)
disks_json = json.loads(stdout)
block_devices = disks_json['blockdevices']
# This logic won't wor... | Returns the number of non boot disks attached to the VM. | GetNonBootDiskCount | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def SetUpDiskOnWindows(self):
"""Performs Windows specific setup of ram disk."""
raise NotImplementedError(
f'{self.disk_spec.disk_type} is not supported on Windows.'
) | Performs Windows specific setup of ram disk. | SetUpDiskOnWindows | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def SetUpDiskOnLinux(self):
"""Performs Linux specific setup of ram disk."""
raise NotImplementedError(
f'{self.disk_spec.disk_type} is not supported on linux.'
) | Performs Linux specific setup of ram disk. | SetUpDiskOnLinux | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def CheckDisksVisibility(self):
"""Checks for all the disks to be visible from the VM.
Returns:
True : if all the disks are visible to the VM
"""
non_boot_disks_attached = GetNonBootDiskCount(self.vm)
if non_boot_disks_attached == self.GetTotalDiskCount():
return True
else:
re... | Checks for all the disks to be visible from the VM.
Returns:
True : if all the disks are visible to the VM
| CheckDisksVisibility | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def WaitForRemoteDisksToVisibleFromVm(self, start_time) -> float:
"""Waits for the disks to be visible from the Guest.
Args:
start_time: time when the attach operation started.
Returns:
time taken for all the disks to be visible from the Guest.
Raises:
DisksAreNotVisibleError: if th... | Waits for the disks to be visible from the Guest.
Args:
start_time: time when the attach operation started.
Returns:
time taken for all the disks to be visible from the Guest.
Raises:
DisksAreNotVisibleError: if the disks are not visible.
| WaitForRemoteDisksToVisibleFromVm | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def PrepareLinuxScratchDisk(
self,
vm,
scratch_disk: Union[disk.BaseDisk, disk.StripedDisk],
disk_spec: disk.BaseDiskSpec,
) -> None:
"""Format and mount scratch disk.
Args:
vm: Linux Virtual Machine to create scratch disk on.
scratch_disk: Scratch disk to be formatted and... | Format and mount scratch disk.
Args:
vm: Linux Virtual Machine to create scratch disk on.
scratch_disk: Scratch disk to be formatted and mounted.
disk_spec: The BaseDiskSpec object corresponding to the disk.
| PrepareLinuxScratchDisk | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def PrepareWindowsScratchDisk(
self,
vm,
scratch_disk: Union[disk.BaseDisk, disk.StripedDisk],
disk_spec: disk.BaseDiskSpec,
) -> None:
"""Format and mount scratch disk.
Args:
vm: Windows Virtual Machine to create scratch disk on.
scratch_disk: Scratch disk to be formatted... | Format and mount scratch disk.
Args:
vm: Windows Virtual Machine to create scratch disk on.
scratch_disk: Scratch disk to be formatted and mounted.
disk_spec: The BaseDiskSpec object corresponding to the disk.
| PrepareWindowsScratchDisk | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def GetLocalSSDDeviceIDs(self, vm) -> list[str]:
"""Get all local ssd device ids."""
names = self.GetLocalSSDNames()
if not names:
# This function is not implemented in this cloud provider.
logging.info('Temp DB is not supported on this cloud')
return []
clause = ' -or '.join([f'($_.... | Get all local ssd device ids. | GetLocalSSDDeviceIDs | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def PrepareTempDbDisk(self, vm: 'virtual_machine.BaseVirtualMachine'):
"""Format and mount temp db disk for sql server."""
# Create and then run a Diskpart script that will initialize the disks,
# create a volume, and then format and mount the volume.
# This would trigger when we detect local ssds on th... | Format and mount temp db disk for sql server. | PrepareTempDbDisk | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def CheckDisksDetach(self):
"""Checks for all the disks to be detached from the VM.
Returns:
True : if all the disks are detached from the VM
"""
non_boot_disks_attached = GetNonBootDiskCount(self.vm)
if non_boot_disks_attached - self.vm.max_local_disks == 0:
return True
else:
... | Checks for all the disks to be detached from the VM.
Returns:
True : if all the disks are detached from the VM
| CheckDisksDetach | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def WaitForDisksToDetachFromVm(self) -> float:
"""Waits for the disks to detach from the Guest.
Returns:
time taken for all the disks to detach from the Guest.
Raises:
DisksAreNotDetachedError: if any disk is visible.
"""
if not self.CheckDisksDetach():
raise DisksAreNotDetachedE... | Waits for the disks to detach from the Guest.
Returns:
time taken for all the disks to detach from the Guest.
Raises:
DisksAreNotDetachedError: if any disk is visible.
| WaitForDisksToDetachFromVm | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/disk_strategies.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/disk_strategies.py | Apache-2.0 |
def FetchOutput(self):
"""Populates stdout and stderr according to fetch_output_fn callback."""
stdout, stderr = self.fetch_output_fn()
if stdout is not None:
self.stdout = stdout
if stderr is not None:
self.stderr = stderr | Populates stdout and stderr according to fetch_output_fn callback. | FetchOutput | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def GetSamples(
self,
prefix: str = '',
renames: dict[str, str] | None = None,
metadata: MutableMapping[str, str] | None = None,
) -> list[sample.Sample]:
"""Gets PKB samples for these costs.
Args:
prefix: Add a prefix before the samples name if passed.
renames: Optional d... | Gets PKB samples for these costs.
Args:
prefix: Add a prefix before the samples name if passed.
renames: Optional dict arg where each entry represents a metric rename,
being the key the original name and the value the new name. prefix is
added after the rename.
metadata: String ma... | GetSamples | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def _JobJars(self) -> Dict[str, Dict[str, str]]:
"""Known mappings of jars in the cluster used by GetExecutionJar."""
return {
dpb_constants.SPARK_JOB_TYPE: {
# Default for Dataproc and EMR
'examples': 'file:///usr/lib/spark/examples/jars/spark-examples.jar'
}
} | Known mappings of jars in the cluster used by GetExecutionJar. | _JobJars | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def __init__(self, dpb_service_spec):
"""Initialize the Dpb service object.
Args:
dpb_service_spec: spec of the dpb service.
"""
is_user_managed = dpb_service_spec.static_dpb_service_instance is not None
# Hand over the actual creation to the resource module which treats the
# user_manage... | Initialize the Dpb service object.
Args:
dpb_service_spec: spec of the dpb service.
| __init__ | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def _GetCompletedJob(self, job_id: str) -> JobResult | None:
"""Get the job result if it has finished.
Args:
job_id: The step id to query.
Returns:
A dictionary describing the job if the step the step is complete,
None otherwise.
Raises:
JobSubmissionError if job fails.
... | Get the job result if it has finished.
Args:
job_id: The step id to query.
Returns:
A dictionary describing the job if the step the step is complete,
None otherwise.
Raises:
JobSubmissionError if job fails.
| _GetCompletedJob | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def DistributedCopy(
self,
source: str,
destination: str,
properties: Dict[str, str] | None = None,
) -> JobResult:
"""Method to copy data using a distributed job on the cluster.
Args:
source: HCFS directory to copy data from.
destination: name of new HCFS directory to cop... | Method to copy data using a distributed job on the cluster.
Args:
source: HCFS directory to copy data from.
destination: name of new HCFS directory to copy data into.
properties: properties to add to the job. Not supported on EMR.
Returns:
A JobResult with the timing of the successful ... | DistributedCopy | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def _ProcessWallTime(self, start_time, end_time):
"""Compute the wall time from the given start and end processing time.
Args:
start_time: Datetime value when the processing was started.
end_time: Datetime value when the processing completed.
Returns:
Wall time in seconds.
Raises:
... | Compute the wall time from the given start and end processing time.
Args:
start_time: Datetime value when the processing was started.
end_time: Datetime value when the processing completed.
Returns:
Wall time in seconds.
Raises:
ValueError: Exception raised when invalid input is... | _ProcessWallTime | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def GetClusterProperties(self) -> list[str]:
"""Gets cluster props in the format of the dpb_cluster_properties flag.
Note that this might return an empty list if both --dpb_dynamic_allocation
and --dpb_cluster_properties are unset.
Returns:
A list of cluster properties, with each element being i... | Gets cluster props in the format of the dpb_cluster_properties flag.
Note that this might return an empty list if both --dpb_dynamic_allocation
and --dpb_cluster_properties are unset.
Returns:
A list of cluster properties, with each element being in the same format
the --dpb_cluster_properties... | GetClusterProperties | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def GetExecutionJar(self, job_category: str, job_type: str) -> str:
"""Retrieve execution jar corresponding to the job_category and job_type.
Args:
job_category: String category of the job for eg. hadoop, spark, hive, etc.
job_type: String name of the type of workload to executed on the cluster,
... | Retrieve execution jar corresponding to the job_category and job_type.
Args:
job_category: String category of the job for eg. hadoop, spark, hive, etc.
job_type: String name of the type of workload to executed on the cluster,
for eg. word_count, terasort, etc.
Returns:
The path to th... | GetExecutionJar | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def GetClusterCreateTime(self) -> float | None:
"""Returns the cluster creation time.
This default implementation computes it by substracting the
resource_ready_time and create_start_time attributes.
Returns:
A float representing the creation time in seconds or None.
"""
if self.resource... | Returns the cluster creation time.
This default implementation computes it by substracting the
resource_ready_time and create_start_time attributes.
Returns:
A float representing the creation time in seconds or None.
| GetClusterCreateTime | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def GetClusterCost(self) -> float | None:
"""Gets the cost of running the cluster if applicable.
Default implementation returns the sum of cluster hardware cost and service
premium cost.
Guaranteed to be called after the cluster has been shut down if applicable.
Returns:
A float representin... | Gets the cost of running the cluster if applicable.
Default implementation returns the sum of cluster hardware cost and service
premium cost.
Guaranteed to be called after the cluster has been shut down if applicable.
Returns:
A float representing the cost in dollars or None if not implemented.... | GetClusterCost | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def GetClusterHardwareCost(self) -> float | None:
"""Computes the hardware cost with --dpb_hardware_hourly_cost value.
Default implementation multiplies --dpb_hardware_hourly_cost with the value
returned by GetClusterDuration().
Returns:
A float representing the cost in dollars or None if not im... | Computes the hardware cost with --dpb_hardware_hourly_cost value.
Default implementation multiplies --dpb_hardware_hourly_cost with the value
returned by GetClusterDuration().
Returns:
A float representing the cost in dollars or None if not implemented.
| GetClusterHardwareCost | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def GetClusterPremiumCost(self) -> float | None:
"""Computes the premium cost with --dpb_service_premium_hourly_cost value.
Default implementation multiplies --dpb_service_premium_hourly_cost with the
value returned by GetClusterDuration().
Returns:
A float representing the cost in dollars or No... | Computes the premium cost with --dpb_service_premium_hourly_cost value.
Default implementation multiplies --dpb_service_premium_hourly_cost with the
value returned by GetClusterDuration().
Returns:
A float representing the cost in dollars or None if not implemented.
| GetClusterPremiumCost | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def GetClusterCreateTime(self) -> float | None:
"""Returns the cluster creation time.
UnmanagedDpbService Create phase doesn't consider actual VM creation, just
further provisioning. Thus, we need to add the VMs create time to the
default implementation.
Returns:
A float representing the cre... | Returns the cluster creation time.
UnmanagedDpbService Create phase doesn't consider actual VM creation, just
further provisioning. Thus, we need to add the VMs create time to the
default implementation.
Returns:
A float representing the creation time in seconds or None.
| GetClusterCreateTime | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def _Create(self):
"""Create an un-managed yarn cluster."""
logging.info('Should have created vms by now.')
logging.info(str(self.vms))
def InstallHadoop(vm):
vm.Install('hadoop')
if self.cloud == 'GCP':
hadoop.InstallGcsConnector(vm)
if 'worker_group' not in self.vms:
ra... | Create an un-managed yarn cluster. | _Create | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def _CreateConfigMapDir(self):
"""Returns a TemporaryDirectory containing files in the ConfigMap."""
temp_directory = tempfile.TemporaryDirectory()
# Create flink-conf.yaml to configure flink.
flink_conf_filename = os.path.join(temp_directory.name, 'flink-conf.yaml')
with open(flink_conf_filename, '... | Returns a TemporaryDirectory containing files in the ConfigMap. | _CreateConfigMapDir | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def GetDpbServiceClass(
cloud: str, dpb_service_type: str
) -> Type[BaseDpbService] | None:
"""Gets the Data Processing Backend class corresponding to 'service_type'.
Args:
cloud: String name of cloud of the service
dpb_service_type: String service type as specified in configuration
Returns:
Imp... | Gets the Data Processing Backend class corresponding to 'service_type'.
Args:
cloud: String name of cloud of the service
dpb_service_type: String service type as specified in configuration
Returns:
Implementation class corresponding to the argument dpb_service_type
Raises:
Exception: An invalid... | GetDpbServiceClass | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_service.py | Apache-2.0 |
def GetStreams() -> list[list[str]]:
"""Gets a list of query number streams to run. Respects order in flags."""
if _STREAMS.value:
return [stream.split(',') for stream in _STREAMS.value]
return [FLAGS.dpb_sparksql_order] | Gets a list of query number streams to run. Respects order in flags. | GetStreams | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | Apache-2.0 |
def GetQueryIdsToStage() -> list[str]:
"""Gets all the query IDs to stage according to the flags passed."""
if _STREAMS.value:
queries = set()
for stream in GetStreams():
queries.update(stream)
return sorted(queries)
return FLAGS.dpb_sparksql_order | Gets all the query IDs to stage according to the flags passed. | GetQueryIdsToStage | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | Apache-2.0 |
def StageMetadata(
json_metadata: Any,
storage_service: object_storage_service.ObjectStorageService,
staged_file: str,
):
"""Write JSON metadata to object storage."""
# Write computed metadata to object storage.
temp_run_dir = temp_dir.GetRunDirPath()
local_file = os.path.join(temp_run_dir, os.path.... | Write JSON metadata to object storage. | StageMetadata | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | Apache-2.0 |
def GetQueryId(filename: str) -> str | None:
"""Extract query id from file name."""
match = re.match(r'(.*/)?q?([0-9]+[ab]?)(\.sql)?$', filename)
if match:
return match.group(2) | Extract query id from file name. | GetQueryId | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | Apache-2.0 |
def Prepare(benchmark_spec):
"""Copies scripts and all the queries to cloud."""
cluster = benchmark_spec.dpb_service
storage_service = cluster.storage_service
queries = _FetchQueryContents(storage_service)
rendered_runner_filepath = _RenderRunnerScriptWithQueries(queries)
benchmark_spec.query_streams = GetS... | Copies scripts and all the queries to cloud. | Prepare | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | Apache-2.0 |
def _FetchQueryContents(
storage_service: object_storage_service.ObjectStorageService,
) -> dict[str, str]:
"""Fetches query contents into a dict from a source depending on flags passed.
Queries are selected using --dpb_sparksql_query, --dpb_sparksql_order and
--dpb_sparksql_queries_url.
Args:
storage... | Fetches query contents into a dict from a source depending on flags passed.
Queries are selected using --dpb_sparksql_query, --dpb_sparksql_order and
--dpb_sparksql_queries_url.
Args:
storage_service: object_storage_service to stage queries into.
Returns:
A dict where the key corresponds to the query... | _FetchQueryContents | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | Apache-2.0 |
def _FetchQueryFilesFromUrl(
storage_service: object_storage_service.ObjectStorageService,
queries_url: str,
) -> dict[str, str]:
"""Checks if relevant query files from queries_url exist.
Args:
storage_service: object_storage_service to fetch query files.
queries_url: Object Storage directory URL w... | Checks if relevant query files from queries_url exist.
Args:
storage_service: object_storage_service to fetch query files.
queries_url: Object Storage directory URL where the benchmark queries are
contained.
Returns:
A dict where the key corresponds to the query ID and value to the actual
qu... | _FetchQueryFilesFromUrl | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | Apache-2.0 |
def _FetchQueriesFromRepo() -> dict[str, str]:
"""Fetches queries from default Github repo to object storage."""
temp_run_dir = temp_dir.GetRunDirPath()
spark_sql_perf_dir = os.path.join(temp_run_dir, 'spark_sql_perf_dir')
queries = {}
# Clone repo
vm_util.IssueCommand(['git', 'clone', SPARK_SQL_PERF_GIT, ... | Fetches queries from default Github repo to object storage. | _FetchQueriesFromRepo | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/dpb_sparksql_benchmark_helper.py | Apache-2.0 |
def geometric_mean(iterable: list[float]) -> float:
"""Function to compute the geo mean for a list of numeric values.
Args:
iterable: A list of Float performance values
Returns:
A float value equal to the geometric mean of the input performance values.
Raises:
EdwPerformanceAggregationError: If a... | Function to compute the geo mean for a list of numeric values.
Args:
iterable: A list of Float performance values
Returns:
A float value equal to the geometric mean of the input performance values.
Raises:
EdwPerformanceAggregationError: If an invalid performance value was included
for aggreg... | geometric_mean | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def from_json(cls, serialized_performance: str):
"""Process the serialized query performance from client jar.
Expected Performance format:
{"query_wall_time_in_secs":1.998,"query_end":1601695222108,"query":"1",
"query_start":1601695220110,
"details":{"job_id":"b66b5a8e-633f-4ee4-8632-4e3d0856... | Process the serialized query performance from client jar.
Expected Performance format:
{"query_wall_time_in_secs":1.998,"query_end":1601695222108,"query":"1",
"query_start":1601695220110,
"details":{"job_id":"b66b5a8e-633f-4ee4-8632-4e3d0856172f"}}
Args:
serialized_performance: Stringi... | from_json | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_performance_sample(self, metadata: dict[str, Any]) -> sample.Sample:
"""Method to generate a sample for the query performance.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset, etc.
Returns:
... | Method to generate a sample for the query performance.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset, etc.
Returns:
A sample for the edw query performance.
| get_performance_sample | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_all_query_performance_samples(
self, metadata: dict[str, Any]
) -> list[sample.Sample]:
"""Gets a list of samples for all queries in the iteration.""" | Gets a list of samples for all queries in the iteration. | get_all_query_performance_samples | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_queries_geomean_performance_sample(
self, expected_queries: list[str], metadata: dict[str, Any]
) -> sample.Sample:
"""Gets a sample for geomean of all queries in the iteration.""" | Gets a sample for geomean of all queries in the iteration. | get_queries_geomean_performance_sample | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_wall_time_performance_sample(
self, metadata: dict[str, Any]
) -> sample.Sample:
"""Gets a sample for wall time performance of the iteration.""" | Gets a sample for wall time performance of the iteration. | get_wall_time_performance_sample | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def add_query_performance(
self, query_name: str, performance: float, metadata: dict[str, Any]
):
"""Creates and populates a query performance from the input results.
Updates the iteration's performance map with the query performance.
The method also increaments the success and failure query counts... | Creates and populates a query performance from the input results.
Updates the iteration's performance map with the query performance.
The method also increaments the success and failure query counts for the
iteration.
Also updates the wall time of the iteration based on the query time.
Args:
... | add_query_performance | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def _log_and_strip_query_results(
self, metadata: dict[str, str | dict[Any, Any]]
) -> None:
"""Logs first 100 characters of query output, then removes from metadata.
Args:
metadata: A metadata dict with query detail fields resulting of a query
run via an EDW driver. If a key named 'outpu... | Logs first 100 characters of query output, then removes from metadata.
Args:
metadata: A metadata dict with query detail fields resulting of a query
run via an EDW driver. If a key named 'output' exists in the dict, then
the first 100 characters of the associated value are printed, and the
... | _log_and_strip_query_results | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_query_metadata(self, query_name: str) -> dict[str, Any]:
"""Gets the metadata of a query as executed in the current iteration.
Args:
query_name: Name of the query whose performance is requested.
Returns:
A dictionary set to the query's metadata.
Raises:
EdwPerformanceAggrega... | Gets the metadata of a query as executed in the current iteration.
Args:
query_name: Name of the query whose performance is requested.
Returns:
A dictionary set to the query's metadata.
Raises:
EdwPerformanceAggregationError: If the query failed.
| get_query_metadata | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_all_query_performance_samples(
self, metadata: dict[str, Any]
) -> list[sample.Sample]:
"""Gets a list of samples for all queries in the iteration.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of da... | Gets a list of samples for all queries in the iteration.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset, etc.
Returns:
A list of samples of each query's performance
| get_all_query_performance_samples | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_wall_time_performance_sample(
self, metadata: dict[str, Any]
) -> sample.Sample:
"""Gets a sample for wall time performance of the iteration.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset,... | Gets a sample for wall time performance of the iteration.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset, etc.
Returns:
A sample of iteration wall time performance
| get_wall_time_performance_sample | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def is_successful(self, expected_queries: list[str]) -> bool:
"""Check if all the expected queries ran and all succeeded."""
all_queries_ran = set(self.get_all_queries_in_iteration()) == set(
expected_queries
)
all_queries_were_successful = self.total_count == self.successful_count
return al... | Check if all the expected queries ran and all succeeded. | is_successful | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_queries_geomean(self) -> float:
"""Gets the geometric mean of all queries in the iteration.
Returns:
The (float) geometric mean of all the queries ran in the iteration.
Raises:
EdwPerformanceAggregationError: If the iteration contains unsuccessful
query executions.
"""
... | Gets the geometric mean of all queries in the iteration.
Returns:
The (float) geometric mean of all the queries ran in the iteration.
Raises:
EdwPerformanceAggregationError: If the iteration contains unsuccessful
query executions.
| get_queries_geomean | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_queries_geomean_performance_sample(
self, expected_queries: list[str], metadata: dict[str, Any]
) -> sample.Sample:
"""Gets a sample for geomean of all queries in the iteration.
Args:
expected_queries: A list of query names expected to have been executed in
an iteration.
met... | Gets a sample for geomean of all queries in the iteration.
Args:
expected_queries: A list of query names expected to have been executed in
an iteration.
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset, ... | get_queries_geomean_performance_sample | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def from_json(cls, iteration_id: str, serialized_performance: str):
"""Process the serialized simultaneous iteration performance from client jar.
Expected Performance format:
{"simultaneous_end":1601145943197,"simultaneous_start":1601145940113,
"all_queries_performance_array":[{"query_wall_time_in_... | Process the serialized simultaneous iteration performance from client jar.
Expected Performance format:
{"simultaneous_end":1601145943197,"simultaneous_start":1601145940113,
"all_queries_performance_array":[{"query_wall_time_in_secs":2.079,
"query_end":1601145942208,"job_id":"914682d9-4f64-4323-b... | from_json | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def is_query_successful(self, query_name: str) -> bool:
"""Returns whether the query was successful in the iteration.
Args:
query_name: A String name of the query to check.
Returns:
A boolean value indicating if the query was successful in the iteration.
"""
if self.has_query_performan... | Returns whether the query was successful in the iteration.
Args:
query_name: A String name of the query to check.
Returns:
A boolean value indicating if the query was successful in the iteration.
| is_query_successful | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_query_metadata(self, query_name: str) -> dict[str, Any]:
"""Gets the metadata of a query in the current iteration.
Args:
query_name: Name of the query whose aggregated performance is requested
Returns:
A dictionary set to the query's aggregated metadata, accumulated from the
raw... | Gets the metadata of a query in the current iteration.
Args:
query_name: Name of the query whose aggregated performance is requested
Returns:
A dictionary set to the query's aggregated metadata, accumulated from the
raw query run in the current iteration.
Raises:
EdwPerformanceAg... | get_query_metadata | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def from_json(cls, iteration_id: str, serialized_performance: str):
"""Process the serialized throughput iteration performance from client jar.
Expected Performance format:
{"throughput_start":1601666911596,"throughput_end":1601666916139,
"throughput_wall_time_in_secs":4.543,
"all_streams... | Process the serialized throughput iteration performance from client jar.
Expected Performance format:
{"throughput_start":1601666911596,"throughput_end":1601666916139,
"throughput_wall_time_in_secs":4.543,
"all_streams_performance_array":[
{"stream_start":1601666911597,"stream_end":... | from_json | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def has_query_performance(self, query_name: str) -> bool:
"""Returns whether the query was run at least once in the iteration.
Args:
query_name: A String name of the query to check.
Returns:
A boolean value indicating if the query was executed in the iteration.
"""
for stream in self.p... | Returns whether the query was run at least once in the iteration.
Args:
query_name: A String name of the query to check.
Returns:
A boolean value indicating if the query was executed in the iteration.
| has_query_performance | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_query_performance(self, query_name: str) -> float:
"""Gets a query's execution performance aggregated across all streams in the current iteration.
Args:
query_name: A String name of the query to retrieve details for
Returns:
A float value set to the query's average completion time in s... | Gets a query's execution performance aggregated across all streams in the current iteration.
Args:
query_name: A String name of the query to retrieve details for
Returns:
A float value set to the query's average completion time in secs.
| get_query_performance | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_query_metadata(self, query_name: str) -> dict[str, Any]:
"""Gets the metadata of a query aggregated across all streams in the current iteration.
Args:
query_name: Name of the query whose aggregated performance is requested
Returns:
A dictionary set to the query's aggregated metadata, a... | Gets the metadata of a query aggregated across all streams in the current iteration.
Args:
query_name: Name of the query whose aggregated performance is requested
Returns:
A dictionary set to the query's aggregated metadata, accumulated from the
raw query runs in all streams of the current ... | get_query_metadata | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_all_query_performance_samples(
self, metadata: dict[str, Any]
) -> list[sample.Sample]:
"""Gets a list of samples for all queries in all streams of the iteration.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc sui... | Gets a list of samples for all queries in all streams of the iteration.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset, etc.
Returns:
A list of samples of each query's performance
| get_all_query_performance_samples | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def all_streams_ran_all_expected_queries(
self, expected_queries: list[str]
) -> bool:
"""Checks that the same set of expected queries ran in all streams."""
for stream in self.performance.values():
if set(stream.keys()) != set(expected_queries):
return False
return True | Checks that the same set of expected queries ran in all streams. | all_streams_ran_all_expected_queries | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def no_duplicate_queries(self) -> bool:
"""Checks that no streams contain any duplicate queries."""
for stream in self.performance.values():
if len(stream.keys()) != len(set(stream.keys())):
return False
return True | Checks that no streams contain any duplicate queries. | no_duplicate_queries | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def all_queries_succeeded(self) -> bool:
"""Checks if every query in every stream was successful."""
for stream_performance in self.performance.values():
for query_perf in stream_performance.values():
if query_perf.performance == -1:
return False
return True | Checks if every query in every stream was successful. | all_queries_succeeded | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def is_successful(self, expected_queries: list[str]) -> bool:
"""Check if the throughput run was successful.
A successful run meets the following conditions:
- There were more than 0 streams.
- Each stream ran the same set of expected queries (regardless of order)
- Each stream ran each query only ... | Check if the throughput run was successful.
A successful run meets the following conditions:
- There were more than 0 streams.
- Each stream ran the same set of expected queries (regardless of order)
- Each stream ran each query only once
- Every query in every stream succeeded
Args:
exp... | is_successful | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_queries_geomean(self) -> float:
"""Gets the geometric mean of all queries in all streams of the iteration.
Returns:
The (float) geometric mean of all the individual queries ran in all
streams of the iteration.
Raises:
EdwPerformanceAggregationError: If the suite contains unsucc... | Gets the geometric mean of all queries in all streams of the iteration.
Returns:
The (float) geometric mean of all the individual queries ran in all
streams of the iteration.
Raises:
EdwPerformanceAggregationError: If the suite contains unsuccessful query
executions.
| get_queries_geomean | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_queries_geomean_performance_sample(
self, expected_queries: list[str], metadata: dict[str, Any]
) -> sample.Sample:
"""Gets a sample for geomean of all queries in all streams of the iteration.
Args:
expected_queries: A list of query names expected to have been executed in
an itera... | Gets a sample for geomean of all queries in all streams of the iteration.
Args:
expected_queries: A list of query names expected to have been executed in
an iteration.
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, sca... | get_queries_geomean_performance_sample | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_wall_time_performance_sample(
self, metadata: dict[str, Any]
) -> sample.Sample:
"""Gets a sample for total wall time performance of the iteration.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of da... | Gets a sample for total wall time performance of the iteration.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset, etc.
Returns:
A sample of iteration wall time performance
| get_wall_time_performance_sample | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def add_iteration_performance(self, performance: EdwBaseIterationPerformance):
"""Add an iteration's performance to the benchmark results.
Args:
performance: An instance of EdwBaseIterationPerformance encapsulating the
iteration performance details.
Raises:
EdwPerformanceAggregationErr... | Add an iteration's performance to the benchmark results.
Args:
performance: An instance of EdwBaseIterationPerformance encapsulating the
iteration performance details.
Raises:
EdwPerformanceAggregationError: If the iteration has already been added.
| add_iteration_performance | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def is_successful(self) -> bool:
"""Check a benchmark's success, only if all the iterations succeed."""
return functools.reduce(
(lambda x, y: x and y),
[
iteration_performance.is_successful(self.expected_queries)
for iteration_performance in self.iteration_performances.v... | Check a benchmark's success, only if all the iterations succeed. | is_successful | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def aggregated_query_status(self, query_name: str) -> bool:
"""Gets the status of query aggregated across all iterations.
A query is considered successful only if
a. Query was executed in every iteration
b. Query was successful in every iteration
Args:
query_name: Name of the query whose... | Gets the status of query aggregated across all iterations.
A query is considered successful only if
a. Query was executed in every iteration
b. Query was successful in every iteration
Args:
query_name: Name of the query whose aggregated success is requested
Returns:
A boolean valu... | aggregated_query_status | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def aggregated_query_execution_time(self, query_name: str) -> float:
"""Gets the execution time of query aggregated across all iterations.
Args:
query_name: Name of the query whose aggregated performance is requested
Returns:
A float value set to the query's aggregated execution time
Rais... | Gets the execution time of query aggregated across all iterations.
Args:
query_name: Name of the query whose aggregated performance is requested
Returns:
A float value set to the query's aggregated execution time
Raises:
EdwPerformanceAggregationError: If the query failed in one or more... | aggregated_query_execution_time | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def aggregated_query_metadata(self, query_name: str) -> dict[str, Any]:
"""Gets the metadata of a query aggregated across all iterations.
Args:
query_name: Name of the query whose aggregated performance is requested
Returns:
A dictionary set to the query's aggregated metadata, accumulated from... | Gets the metadata of a query aggregated across all iterations.
Args:
query_name: Name of the query whose aggregated performance is requested
Returns:
A dictionary set to the query's aggregated metadata, accumulated from the
raw query runs.
Raises:
EdwPerformanceAggregationError: ... | aggregated_query_metadata | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_aggregated_query_performance_sample(
self, query_name: str, metadata: dict[str, Any]
) -> sample.Sample:
"""Gets the performance of query aggregated across all iterations.
Args:
query_name: Name of the query whose aggregated performance is requested
metadata: A dictionary of executi... | Gets the performance of query aggregated across all iterations.
Args:
query_name: Name of the query whose aggregated performance is requested
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset, etc.
Returns:
... | get_aggregated_query_performance_sample | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_all_query_performance_samples(
self, metadata: dict[str, Any]
) -> list[sample.Sample]:
"""Generates samples for all query performances.
Benchmark relies on iteration runs to generate the raw query performance
samples
Benchmark appends the aggregated query performance sample
Args... | Generates samples for all query performances.
Benchmark relies on iteration runs to generate the raw query performance
samples
Benchmark appends the aggregated query performance sample
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes... | get_all_query_performance_samples | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_aggregated_wall_time_performance_sample(
self, metadata: dict[str, Any]
) -> sample.Sample:
"""Gets the wall time performance aggregated across all iterations.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite,... | Gets the wall time performance aggregated across all iterations.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset, etc.
Returns:
A sample of aggregated (averaged) wall time.
| get_aggregated_wall_time_performance_sample | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_wall_time_performance_samples(self, metadata: dict[str, Any]):
"""Generates samples for all wall time performances.
Benchmark relies on iterations to generate the raw wall time performance
samples.
Benchmark appends the aggregated wall time performance sample
Args:
metadata: A dict... | Generates samples for all wall time performances.
Benchmark relies on iterations to generate the raw wall time performance
samples.
Benchmark appends the aggregated wall time performance sample
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution a... | get_wall_time_performance_samples | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_aggregated_geomean_performance_sample(
self, metadata: dict[str, Any]
) -> sample.Sample:
"""Gets the geomean performance aggregated across all iterations.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, sca... | Gets the geomean performance aggregated across all iterations.
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attributes, for eg. tpc suite, scale of dataset, etc.
Returns:
A sample of aggregated geomean
Raises:
EdwPerformanceAggregati... | get_aggregated_geomean_performance_sample | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def get_queries_geomean_performance_samples(
self, metadata: dict[str, Any]
) -> list[sample.Sample]:
"""Generates samples for all geomean performances.
Benchmark relies on iteration runs to generate the raw geomean performance
samples
Benchmark appends the aggregated geomean performance samp... | Generates samples for all geomean performances.
Benchmark relies on iteration runs to generate the raw geomean performance
samples
Benchmark appends the aggregated geomean performance sample
Args:
metadata: A dictionary of execution attributes to be merged with the query
execution attr... | get_queries_geomean_performance_samples | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_benchmark_results_aggregator.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_benchmark_results_aggregator.py | Apache-2.0 |
def SetProvisionedAttributes(self, benchmark_spec):
"""Sets any attributes that were unknown during initialization."""
self.client_vm = benchmark_spec.vms[0]
self.client_vm.RemoteCommand(
'echo "\nMaxSessions 100" | sudo tee -a /etc/ssh/sshd_config'
) | Sets any attributes that were unknown during initialization. | SetProvisionedAttributes | python | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/edw_service.py | https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/edw_service.py | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.