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 Prepare(benchmark_spec): """Prepare the virtual machines to run cloud spanner benchmarks. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ benchmark_spec.always_call_cleanup = True vms = benchmark_spec.vms # Install required pac...
Prepare the virtual machines to run cloud spanner benchmarks. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_spanner_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_spanner_ycsb_benchmark.py
Apache-2.0
def _BuildSchema(): """BuildSchema. Returns: A string of DDL for creating a Spanner table. """ fields = ',\n'.join( [f'field{i} STRING(MAX)' for i in range(FLAGS.ycsb_field_count)] ) return f""" CREATE TABLE {BENCHMARK_TABLE} ( id STRING(MAX), {fields} ) PRIMARY KEY(id) """
BuildSchema. Returns: A string of DDL for creating a Spanner table.
_BuildSchema
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_spanner_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_spanner_ycsb_benchmark.py
Apache-2.0
def PrepareStartupScript() -> Tuple[str, int | None, str]: """Prepare startup script which will be ran as part of VM booting process.""" port = _TCPDUMP_PORT.value if CollectNetworkSamples(): if not port: # If not specified, find a free port and close so it can be used by # tcpdump. sock = s...
Prepare startup script which will be ran as part of VM booting process.
PrepareStartupScript
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
Apache-2.0
def GetTimeToBoot(vms): """Creates Samples for the boot time of a list of VMs. The time to create async return is the time difference from before the VM is created to when the asynchronous create call returns. The time to running is the time difference from before the VM is created to when the VM is in the ...
Creates Samples for the boot time of a list of VMs. The time to create async return is the time difference from before the VM is created to when the asynchronous create call returns. The time to running is the time difference from before the VM is created to when the VM is in the 'running' state as determined...
GetTimeToBoot
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
Apache-2.0
def _MeasureReboot(vms): """Measures the time to reboot the cluster of VMs. Args: vms: List of BaseVirtualMachine subclasses. Returns: List of Samples containing the reboot times and an overall cluster reboot time. """ before_reboot_timestamp = time.time() reboot_times = background_tasks.RunTh...
Measures the time to reboot the cluster of VMs. Args: vms: List of BaseVirtualMachine subclasses. Returns: List of Samples containing the reboot times and an overall cluster reboot time.
_MeasureReboot
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
Apache-2.0
def MeasureDelete( vms: List[virtual_machine.BaseVirtualMachine], ) -> List[sample.Sample]: """Measures the time to delete the cluster of VMs. Args: vms: List of BaseVirtualMachine subclasses. Returns: List of Samples containing the delete times and an overall cluster delete time. """ # Only...
Measures the time to delete the cluster of VMs. Args: vms: List of BaseVirtualMachine subclasses. Returns: List of Samples containing the delete times and an overall cluster delete time.
MeasureDelete
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
Apache-2.0
def _GetVmOperationDataSamples( operation_times: List[int], cluster_time: float, operation: str, vms: List[virtual_machine.BaseVirtualMachine], ) -> List[sample.Sample]: """Append samples from given data. Args: operation_times: The list of times for each vms. cluster_time: The cluster time ...
Append samples from given data. Args: operation_times: The list of times for each vms. cluster_time: The cluster time for the benchmark. operation: The benchmark operation being run, capitalized with no spaces. vms: list of virtual machines. Returns: List of samples constructed from data.
_GetVmOperationDataSamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Measure the boot time for all VMs. Args: benchmark_spec: The benchmark specification. Returns: An empty list (all boot samples will be added later). """ samples = [] if _LINUX_BOOT_METRICS.value or CollectNetworkSamples(): for vm in benchmark_spec.vms: samples...
Measure the boot time for all VMs. Args: benchmark_spec: The benchmark specification. Returns: An empty list (all boot samples will be added later).
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec): """Kill tcpdump process and upload and/or delete tcpdump output file. Args: benchmark_spec: The benchmark specification. """ if CollectNetworkSamples(): pid = benchmark_spec.config.temporary['tcpdump_pid'] logging.info('Terminating tcpdump process %s', pid) try: ...
Kill tcpdump process and upload and/or delete tcpdump output file. Args: benchmark_spec: The benchmark specification.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run netperf TCP_STREAM between containers. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ samples = [] cluster = benchmark_spec.container_cluster container...
Run netperf TCP_STREAM between containers. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/container_netperf_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/container_netperf_benchmark.py
Apache-2.0
def GetConfig(user_config): """Decide number of vms needed and return information for copy benchmark.""" if FLAGS.copy_benchmark_mode == 'dd' and FLAGS.copy_benchmark_single_file_mb: raise errors.Setup.InvalidFlagConfigurationError( 'Flag copy_benchmark_single_file_mb is not supported when flag ' ...
Decide number of vms needed and return information for copy benchmark.
GetConfig
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
Apache-2.0
def PrepareDataFile(vm, data_size_in_mb): """Generate data file on vm to destination directory. Args: vm: The VM which needs the data file. data_size_in_mb: The size of the data file in MB. """ file_path = data.ResourcePath(DATA_FILE) vm.PushFile(file_path, '%s/' % vm.GetScratchDir(0)) if data_size...
Generate data file on vm to destination directory. Args: vm: The VM which needs the data file. data_size_in_mb: The size of the data file in MB.
PrepareDataFile
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Prepare vms with additional scratch disks and create vms for scp. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vms = benchmark_spec.vms background_tasks.RunThreaded(PreparePrivateKey, vms) args = [...
Prepare vms with additional scratch disks and create vms for scp. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
Apache-2.0
def RunCp(vms, data_size_in_mb, metadata): """Runs cp benchmarks and parses results. Args: vms: The VMs running cp benchmarks. data_size_in_mb: The size of the data file in MB. metadata: The base metadata to attach to the sample. Returns: A list of sample.Sample objects. """ cmd = ( 'r...
Runs cp benchmarks and parses results. Args: vms: The VMs running cp benchmarks. data_size_in_mb: The size of the data file in MB. metadata: The base metadata to attach to the sample. Returns: A list of sample.Sample objects.
RunCp
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
Apache-2.0
def RunDd(vms, data_size_in_mb, metadata): """Run dd benchmark and parses results. Args: vms: The VMs running dd benchmarks. data_size_in_mb: The size of the data file in MB. metadata: The metadata to attach to the sample. Returns: A list of samples. Each sample is a 4-tuple of (benchmark_name, ...
Run dd benchmark and parses results. Args: vms: The VMs running dd benchmarks. data_size_in_mb: The size of the data file in MB. metadata: The metadata to attach to the sample. Returns: A list of samples. Each sample is a 4-tuple of (benchmark_name, value, unit, metadata), as accepted by PerfK...
RunDd
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
Apache-2.0
def ChooseSshCipher(vms): """Returns the most-preferred cipher that's available to all vms.""" available = functools.reduce( lambda a, b: a & b, [AvailableCiphers(vm) for vm in vms] ) for cipher in CIPHERS: if cipher in available: return cipher raise Exception( 'None of the preferred cip...
Returns the most-preferred cipher that's available to all vms.
ChooseSshCipher
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
Apache-2.0
def RunScp(vms, data_size_in_mb, metadata): """Run scp benchmark. Args: vms: The vms running scp commands. data_size_in_mb: The size of the data file in MB. metadata: The metadata to attach to the sample. Returns: A list of samples. Each sample is a 4-tuple of (benchmark_name, value, unit, m...
Run scp benchmark. Args: vms: The vms running scp commands. data_size_in_mb: The size of the data file in MB. metadata: The metadata to attach to the sample. Returns: A list of samples. Each sample is a 4-tuple of (benchmark_name, value, unit, metadata), as accepted by PerfKitBenchmarkerPublis...
RunScp
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
Apache-2.0
def RunScpSingleDirection( sending_vm, receiving_vm, cipher, data_size_in_mb, base_metadata ): """Run scp from sending_vm to receiving_vm and parse results. If 'receiving_vm' is accessible via internal IP from 'sending_vm', throughput over internal IP addresses will be tested in addition to external IP add...
Run scp from sending_vm to receiving_vm and parse results. If 'receiving_vm' is accessible via internal IP from 'sending_vm', throughput over internal IP addresses will be tested in addition to external IP addresses. Args: sending_vm: The originating VM for the scp command. receiving_vm: The destinati...
RunScpSingleDirection
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
Apache-2.0
def RunForIpAddress(ip_address, ip_type): """Run SCP benchmark against a destination IP address.""" target_dir = posixpath.join(receiving_vm.GetScratchDir(0), ip_type) cmd = cmd_template % (ip_address, target_dir) receiving_vm.RemoteCommand('mkdir %s' % target_dir) meta = metadata.copy() meta['i...
Run SCP benchmark against a destination IP address.
RunForIpAddress
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run cp/scp on target vms. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of throughput samples. Each sample contains the sample metric (string), value (float), unit (string), and metadata...
Run cp/scp on target vms. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of throughput samples. Each sample contains the sample metric (string), value (float), unit (string), and metadata (dict).
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/copy_throughput_benchmark.py
Apache-2.0
def PrepareCoremark(remote_command): """Prepares coremark on a VM. Args: remote_command: Function to run a remote command on the VM. """ if _COREMARK_PARALLELISM_METHOD.value == PARALLELISM_PTHREAD: remote_command( 'sed -i -e "s/LFLAGS_END += -lrt/LFLAGS_END += -lrt -lpthread/g" %s/%s' ...
Prepares coremark on a VM. Args: remote_command: Function to run a remote command on the VM.
PrepareCoremark
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
Apache-2.0
def RunCoremark(remote_command, thread_count): """Runs coremark on the VM. Args: remote_command: Function to run a remote command on the VM. thread_count: Number of threads to use. Returns: A list of sample.Sample objects with the performance results. """ remote_command( 'cd %s;make PORT_D...
Runs coremark on the VM. Args: remote_command: Function to run a remote command on the VM. thread_count: Number of threads to use. Returns: A list of sample.Sample objects with the performance results.
RunCoremark
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
Apache-2.0
def _ParseOutputForSamples(output, thread_count): """Parses the output from running Coremark to get performance samples. Args: output: The output from running Coremark. thread_count: Number of threads used. Returns: A list of sample.Sample objects. Raises: Benchmarks.RunError: If correct oper...
Parses the output from running Coremark to get performance samples. Args: output: The output from running Coremark. thread_count: Number of threads used. Returns: A list of sample.Sample objects. Raises: Benchmarks.RunError: If correct operation is not validated.
_ParseOutputForSamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Runs Coremark on the target vm. Args: benchmark_spec: The benchmark specification. Returns: A list of sample.Sample objects with the performance results. Raises: Benchmarks.RunError: If correct operation is not validated. """ vm = benchmark_spec.vms[0] output_sam...
Runs Coremark on the target vm. Args: benchmark_spec: The benchmark specification. Returns: A list of sample.Sample objects with the performance results. Raises: Benchmarks.RunError: If correct operation is not validated.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
Apache-2.0
def CleanupCoremark(remote_command): """Cleans up the coremark installation. Args: remote_command: Function to run a remote command on the VM. """ remote_command('rm -rf %s' % COREMARK_DIR) remote_command('rm -f %s' % coremark.COREMARK_TAR)
Cleans up the coremark installation. Args: remote_command: Function to run a remote command on the VM.
CleanupCoremark
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
Apache-2.0
def Run(benchmark_spec: bm_spec.BenchmarkSpec) -> list[sample.Sample]: """Runs the cryptsetup benchmark and returns a dict of performance data. Args: benchmark_spec: The benchmark spec for this sample benchmark. Returns: A list of performance samples. """ vm = benchmark_spec.vms[0] # TODO(user): I...
Runs the cryptsetup benchmark and returns a dict of performance data. Args: benchmark_spec: The benchmark spec for this sample benchmark. Returns: A list of performance samples.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cryptsetup_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cryptsetup_benchmark.py
Apache-2.0
def Prepare(bm_spec: benchmark_spec.BenchmarkSpec) -> None: """Install and set up CUDA memcpy on the target vm. Args: bm_spec: The benchmark specification """ background_tasks.RunThreaded( lambda vm: vm.Install('cuda_samples'), bm_spec.vms )
Install and set up CUDA memcpy on the target vm. Args: bm_spec: The benchmark specification
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cuda_memcpy_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cuda_memcpy_benchmark.py
Apache-2.0
def _MetadataFromFlags() -> Dict[str, Any]: """Returns metadata dictionary from flag settings.""" return { 'memory': _MEMORY.value, 'mode': _MODE.value, 'htod': _HTOD.value, 'dtoh': _DTOH.value, 'dtod': _DTOD.value, 'wc': _WC.value, }
Returns metadata dictionary from flag settings.
_MetadataFromFlags
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cuda_memcpy_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cuda_memcpy_benchmark.py
Apache-2.0
def _CollectGpuSamples( vm: virtual_machine.BaseVirtualMachine, ) -> List[sample.Sample]: """Run CUDA memcpy on the cluster. Args: vm: The virtual machine to run the benchmark. Returns: A list of sample.Sample objects. """ if not nvidia_driver.CheckNvidiaSmiExists(vm): return [] global_met...
Run CUDA memcpy on the cluster. Args: vm: The virtual machine to run the benchmark. Returns: A list of sample.Sample objects.
_CollectGpuSamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cuda_memcpy_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cuda_memcpy_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run the DaCapo benchmark on the vms. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A singleton list of sample.Sample objects containing the DaCapo benchmark run time (in msec). Raises: err...
Run the DaCapo benchmark on the vms. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A singleton list of sample.Sample objects containing the DaCapo benchmark run time (in msec). Raises: errors.Benchmarks.RunError if the...
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dacapo_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dacapo_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec): """Cleanup the DaCapo benchmark on the target vm (by uninstalling). Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ benchmark_spec.vms[0].RemoteCommand( 'rm -rf %s' % os.path.join(linux_packages.INSTALL...
Cleanup the DaCapo benchmark on the target vm (by uninstalling). Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dacapo_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dacapo_benchmark.py
Apache-2.0
def Run(benchmark_spec: bm_spec.BenchmarkSpec) -> List[sample.Sample]: """Runs the data discovery benchmark. This benchmark measures the time it took for the data discovery service to discover the data at the location given in the --data_discovery_path flag and reports it as a sample. Args: benchmark_sp...
Runs the data discovery benchmark. This benchmark measures the time it took for the data discovery service to discover the data at the location given in the --data_discovery_path flag and reports it as a sample. Args: benchmark_spec: Spec needed to run the data discovery benchmark. Returns: A list ...
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/data_discovery_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/data_discovery_benchmark.py
Apache-2.0
def Prepare(bm_spec: benchmark_spec.BenchmarkSpec) -> None: """Install and set up Dino benchmark on the target vm. Args: bm_spec: The benchmark specification """ vm = bm_spec.vms[0] vm.Install('cuda_toolkit') data_dir = vm.scratch_disks[0].mount_point vm.DownloadPreprovisionedData(data_dir, 'imagenet...
Install and set up Dino benchmark on the target vm. Args: bm_spec: The benchmark specification
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dino_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dino_benchmark.py
Apache-2.0
def MakeSamplesFromOutput(output: str) -> List[sample.Sample]: """Create samples containing metrics. Args: output: string, command output Returns: Samples containing training metrics, and the bandwidth """ samples = [] results = regex_util.ExtractAllMatches( ( r'Epoch: \[(\d+)/(\d+...
Create samples containing metrics. Args: output: string, command output Returns: Samples containing training metrics, and the bandwidth
MakeSamplesFromOutput
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dino_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dino_benchmark.py
Apache-2.0
def Run(benchmark_spec: bm_spec.BenchmarkSpec) -> list[sample.Sample]: """Run the benchmark using the runner VM to manage snapshots.""" vms = benchmark_spec.vm_groups['server'] all_samples = [] all_vm_samples_before_run = background_tasks.RunThreaded( lambda vm: CreateSnapshotOnVM(vm, 1), vms ) for sa...
Run the benchmark using the runner VM to manage snapshots.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/disk_snapshot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/disk_snapshot_benchmark.py
Apache-2.0
def CreateSnapshotOnVM( vm: linux_virtual_machine.BaseLinuxVirtualMachine, snapshot_num: int = 1, ) -> list[sample.Sample]: """Create a snapshot on the given vm.""" used_disk_size, _ = vm.RemoteCommand( 'df -h | grep ".*/var/lib/mysql" | awk \'{print $3}\'' ) logging.info('Create snapshot on %s', ...
Create a snapshot on the given vm.
CreateSnapshotOnVM
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/disk_snapshot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/disk_snapshot_benchmark.py
Apache-2.0
def Prepare(bm_spec: benchmark_spec.BenchmarkSpec) -> None: """Installs and sets up MLPerf Inference on the target vm. Args: bm_spec: The benchmark specification Raises: errors.Config.InvalidValue upon both GPUs and TPUs appear in the config """ vm = bm_spec.vms[0] vm.Install('dlrm') vm.InstallP...
Installs and sets up MLPerf Inference on the target vm. Args: bm_spec: The benchmark specification Raises: errors.Config.InvalidValue upon both GPUs and TPUs appear in the config
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dlrm_amd_cpu_inference_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dlrm_amd_cpu_inference_benchmark.py
Apache-2.0
def CheckPrerequisites(benchmark_config): """Verifies that the required resources are present. Args: benchmark_config: Config needed to run the dpb cluster boot benchmark. Raises: perfkitbenchmarker.errors.Config.InvalidValue: On encountering invalid configuration. """ dpb_service_type = benchma...
Verifies that the required resources are present. Args: benchmark_config: Config needed to run the dpb cluster boot benchmark. Raises: perfkitbenchmarker.errors.Config.InvalidValue: On encountering invalid configuration.
CheckPrerequisites
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_cluster_boot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_cluster_boot_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Runs the dpb cluster boot benchmark. The benchmark computes and publishes the time taken from the issuance of cluster creation command till the cluster is ready to accept jobs for processing. Args: benchmark_spec: Spec needed to run the dpb cluster boot benchmark Returns: ...
Runs the dpb cluster boot benchmark. The benchmark computes and publishes the time taken from the issuance of cluster creation command till the cluster is ready to accept jobs for processing. Args: benchmark_spec: Spec needed to run the dpb cluster boot benchmark Returns: A list of samples, compris...
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_cluster_boot_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_cluster_boot_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Snapshot Pub/Sub input subscription to later restore at end of test.""" suffix = ''.join( random.choice(string.ascii_lowercase + string.digits) for i in range(6) ) benchmark_spec.input_subscription_name = ( FLAGS.dpb_dataflow_template_input_subscription.split('/')[-1]...
Snapshot Pub/Sub input subscription to later restore at end of test.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_dataflow_template_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_dataflow_template_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Runs a Dataflow Template until input Pub/Sub topic is empty.""" template_gcs_location = FLAGS.dpb_dataflow_template_gcs_location output_ptransform = FLAGS.dpb_dataflow_template_output_ptransform input_pubsub_id = FLAGS.dpb_dataflow_template_input_subscription input_pubsub_name = be...
Runs a Dataflow Template until input Pub/Sub topic is empty.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_dataflow_template_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_dataflow_template_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec): """Restore Pub/Sub to its original state before test started.""" cmd = util.GcloudCommand( None, 'pubsub', 'subscriptions', 'seek', benchmark_spec.input_subscription_name, ) cmd.flags = { 'project': util.GetDefaultProject(), 'snapshot': benc...
Restore Pub/Sub to its original state before test started.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_dataflow_template_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_dataflow_template_benchmark.py
Apache-2.0
def CheckPrerequisites(benchmark_config): """Verifies that the required resources are present. Args: benchmark_config: Configu to validate. Raises: perfkitbenchmarker.errors.Config.InvalidValue: On encountering invalid configuration. """ dpb_service_type = benchmark_config.dpb_service.service_ty...
Verifies that the required resources are present. Args: benchmark_config: Configu to validate. Raises: perfkitbenchmarker.errors.Config.InvalidValue: On encountering invalid configuration.
CheckPrerequisites
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_distcp_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_distcp_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Runs distributed_copy benchmark and reports the results. Args: benchmark_spec: Spec needed to run the benchmark Returns: A list of samples """ run_uri = benchmark_spec.uuid.split('-')[0] service = benchmark_spec.dpb_service if FLAGS.distcp_source_fs == dpb_constants....
Runs distributed_copy benchmark and reports the results. Args: benchmark_spec: Spec needed to run the benchmark Returns: A list of samples
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_distcp_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_distcp_benchmark.py
Apache-2.0
def CheckPrerequisites(benchmark_config): """Verifies that the required resources are present. Args: benchmark_config: Config needed to run the Spark SQL. Raises: Config.InvalidValue: On encountering invalid configuration. """ if not FLAGS.dpb_sparksql_data and FLAGS.dpb_sparksql_create_hive_tables:...
Verifies that the required resources are present. Args: benchmark_config: Config needed to run the Spark SQL. Raises: Config.InvalidValue: On encountering invalid configuration.
CheckPrerequisites
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Installs and sets up dataset on the Spark clusters. Copies scripts and all the queries to cloud. Creates external Hive tables for data (unless BigQuery is being used). Args: benchmark_spec: The benchmark specification """ cluster = benchmark_spec.dpb_service storage_s...
Installs and sets up dataset on the Spark clusters. Copies scripts and all the queries to cloud. Creates external Hive tables for data (unless BigQuery is being used). Args: benchmark_spec: The benchmark specification
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Runs a sequence of Spark SQL Query. Args: benchmark_spec: Spec needed to run the Spark SQL. Returns: A list of samples, comprised of the detailed run times of individual query. Raises: Benchmarks.RunError if no query succeeds. """ cluster = benchmark_spec.dpb_servi...
Runs a sequence of Spark SQL Query. Args: benchmark_spec: Spec needed to run the Spark SQL. Returns: A list of samples, comprised of the detailed run times of individual query. Raises: Benchmarks.RunError if no query succeeds.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def _GetSampleMetadata(benchmark_spec): """Gets metadata dict to be attached to exported benchmark samples/metrics.""" metadata = benchmark_spec.dpb_service.GetResourceMetadata() metadata['benchmark'] = dpb_sparksql_benchmark_helper.BENCHMARK_NAMES[ FLAGS.dpb_sparksql_query ] if FLAGS.bigquery_record_fo...
Gets metadata dict to be attached to exported benchmark samples/metrics.
_GetSampleMetadata
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def _RunQueries(benchmark_spec) -> tuple[str, dpb_service.JobResult]: """Runs queries. Returns storage path with metrics and JobResult object.""" cluster = benchmark_spec.dpb_service report_dir = '/'.join([cluster.base_dir, f'report-{int(time.time()*1000)}']) args = [] if FLAGS.dpb_sparksql_simultaneous: ...
Runs queries. Returns storage path with metrics and JobResult object.
_RunQueries
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def _GetQuerySamples( storage_service: object_storage_service.ObjectStorageService, report_dir: str, job_result: dpb_service.JobResult, base_metadata: MutableMapping[str, str], ) -> list[sample.Sample]: """Get Sample objects from job's logs.""" if _FETCH_RESULTS_FROM_LOGS.value: query_results =...
Get Sample objects from job's logs.
_GetQuerySamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def _GetGlobalSamples( query_samples: list[sample.Sample], cluster: dpb_service.BaseDpbService, job_result: dpb_service.JobResult, metadata: MutableMapping[str, str], ) -> list[sample.Sample]: """Gets samples that summarize the whole benchmark run.""" run_times = {} passing_queries = {} for s i...
Gets samples that summarize the whole benchmark run.
_GetGlobalSamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def _GetPrepareSamples( benchmark_spec, metadata: MutableMapping[str, str] ) -> list[sample.Sample]: """Gets samples for Prepare stage statistics.""" samples = [] if benchmark_spec.queries_and_script_upload_time is not None: samples.append( sample.Sample( 'queries_and_script_upload_tim...
Gets samples for Prepare stage statistics.
_GetPrepareSamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def _FetchResultsFromStorage( storage_service: object_storage_service.ObjectStorageService, report_dir: str, ) -> list[dict[str, Any]]: """Get Sample objects from metrics storage path.""" # Spark can only write data to directories not files. So do a recursive copy # of that directory and then search it fo...
Get Sample objects from metrics storage path.
_FetchResultsFromStorage
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def _FetchResultsFromLogs(job_result: dpb_service.JobResult): """Get samples from job results logs.""" job_result.FetchOutput() logs = '\n'.join([job_result.stdout or '', job_result.stderr]) query_results = _ParseResultsFromLogs(logs) if query_results is None: raise QueryResultsNotReadyError return quer...
Get samples from job results logs.
_FetchResultsFromLogs
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def _GetDistCpMetadata(base_dir: str, subdirs: List[str], extra_metadata=None): """Compute list of table metadata for spark_sql_distcp metadata flags.""" metadata = [] if not extra_metadata: extra_metadata = {} for subdir in subdirs or []: metadata += [( FLAGS.dpb_sparksql_data_format or 'parque...
Compute list of table metadata for spark_sql_distcp metadata flags.
_GetDistCpMetadata
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Apache-2.0
def Prepare(benchmark_spec: bm_spec.BenchmarkSpec): """Copies scripts and all the queries to cloud. Args: benchmark_spec: The benchmark specification """ cluster = benchmark_spec.dpb_service storage_service = cluster.storage_service benchmark_spec.staged_query = _LoadAndStageQueries(cluster) scripts...
Copies scripts and all the queries to cloud. Args: benchmark_spec: The benchmark specification
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
Apache-2.0
def Run(benchmark_spec: bm_spec.BenchmarkSpec) -> List[sample.Sample]: """Runs a Spark SQL Query. Args: benchmark_spec: Spec needed to run the Spark SQL. Returns: A list of samples, comprised of the detailed run times of query. Raises: Benchmarks.RunError if no query succeeds. """ cluster = b...
Runs a Spark SQL Query. Args: benchmark_spec: Spec needed to run the Spark SQL. Returns: A list of samples, comprised of the detailed run times of query. Raises: Benchmarks.RunError if no query succeeds.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
Apache-2.0
def _DownloadTemplatedQuery( storage_service: object_storage_service.ObjectStorageService, ) -> str: """Downloads the template query to a temporary location. Args: storage_service: object_storage_service to download parameterised query. Returns: path of temporary location where file is downloaded. ...
Downloads the template query to a temporary location. Args: storage_service: object_storage_service to download parameterised query. Returns: path of temporary location where file is downloaded.
_DownloadTemplatedQuery
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
Apache-2.0
def _GetQuerySubstitutions( cluster: dpb_service.BaseDpbService, ) -> Dict[str, str]: """Creates a sql query substitution dictionary. Substitutions is composed of two set of variables 1. list of custom query variables paased in via 'dpb_spark_query_param_json_string' 2. list of cluster specific parameter...
Creates a sql query substitution dictionary. Substitutions is composed of two set of variables 1. list of custom query variables paased in via 'dpb_spark_query_param_json_string' 2. list of cluster specific parameters i.e. cluster_id, region etc. Args: cluster: BaseDpbService object. Returns: Dic...
_GetQuerySubstitutions
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
Apache-2.0
def _GetSubstitutedSqlQuery(cluster: dpb_service.BaseDpbService): """Downloads the query and convert it to string. Args: cluster: BaseDpbService object. Returns: Sql query with all substitutions in place. """ storage_service = cluster.storage_service query_string = '' template_query_path = _Down...
Downloads the query and convert it to string. Args: cluster: BaseDpbService object. Returns: Sql query with all substitutions in place.
_GetSubstitutedSqlQuery
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
Apache-2.0
def _LoadAndStageQueries(cluster: dpb_service.BaseDpbService) -> str: """Loads query from gcs and stages it in object storage. Query is picked from location `--dpb_spark_query_uri_path`. Variables or parameter in query are substituted using `--dpb_spark_query_param_json_string`. Args: cluster: BaseDpbSe...
Loads query from gcs and stages it in object storage. Query is picked from location `--dpb_spark_query_uri_path`. Variables or parameter in query are substituted using `--dpb_spark_query_param_json_string`. Args: cluster: BaseDpbService object. Returns: The path to the staged query path. Raises:...
_LoadAndStageQueries
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_sparksql_custom_benchmark.py
Apache-2.0
def ManageLifecycleResources( base_folder, dpb_service_instance, storage_service ): """Takes the static artifacts and persists them in object store for execution. Args: base_folder: Base folder for the current benchmark run. dpb_service_instance: An instance of the dpb service being benchmarked. st...
Takes the static artifacts and persists them in object store for execution. Args: base_folder: Base folder for the current benchmark run. dpb_service_instance: An instance of the dpb service being benchmarked. storage_service: The object store to use for persistence of the artifacts. Returns: A di...
ManageLifecycleResources
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_spark_io_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_spark_io_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Prepare phase uses schema creation script and sample data to prepare table. Args: benchmark_spec: Configuration that holds the definition and instance details of the resources used for benchmarking. """ storage_service = object_storage_service.GetObjectStorageClass(FLA...
Prepare phase uses schema creation script and sample data to prepare table. Args: benchmark_spec: Configuration that holds the definition and instance details of the resources used for benchmarking.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_spark_io_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_spark_io_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Executes the sql script on the specified Spark cluster. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. Raises: JobSubmissionError if SQL script fails. """ r...
Executes the sql script on the specified Spark cluster. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. Raises: JobSubmissionError if SQL script fails.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_spark_io_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_spark_io_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Executes the given jar on the specified Spark cluster. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. Raises: JobSubmissionError if the job fails. """ meta...
Executes the given jar on the specified Spark cluster. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. Raises: JobSubmissionError if the job fails.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_spark_pi_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_spark_pi_benchmark.py
Apache-2.0
def CheckPrerequisites(benchmark_config): """Verifies that the required resources are present. Args: benchmark_config: Config needed to run the terasort benchmark Raises: perfkitbenchmarker.errors.Config.InvalidValue: On encountering invalid configuration. """ dpb_service_type = benchmark_config...
Verifies that the required resources are present. Args: benchmark_config: Config needed to run the terasort benchmark Raises: perfkitbenchmarker.errors.Config.InvalidValue: On encountering invalid configuration.
CheckPrerequisites
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_terasort_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_terasort_benchmark.py
Apache-2.0
def Run(spec: benchmark_spec.BenchmarkSpec): """Runs the 3 stages of the terasort benchmark. The following stages are executed based on the selected Job Type: * Generating the input data via TeraGen. * Running the actual TeraSort on the input data. * Validating the sorted output data via TeraValidate. ...
Runs the 3 stages of the terasort benchmark. The following stages are executed based on the selected Job Type: * Generating the input data via TeraGen. * Running the actual TeraSort on the input data. * Validating the sorted output data via TeraValidate. The samples report the cumulative results along...
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_terasort_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_terasort_benchmark.py
Apache-2.0
def RunStage( spec: benchmark_spec.BenchmarkSpec, stage: str, stage_args: List[str] ) -> dpb_service.JobResult: """Runs one of the 3 job stages of Terasort. Args: spec: BencharkSpec; the benchmark_spec stage: str; name of the stage being executed stage_args: List[str]; arguments for the stage. R...
Runs one of the 3 job stages of Terasort. Args: spec: BencharkSpec; the benchmark_spec stage: str; name of the stage being executed stage_args: List[str]; arguments for the stage. Returns: JobResult of running job. Raises: JobSubmissionError if job fails.
RunStage
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_terasort_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_terasort_benchmark.py
Apache-2.0
def CheckPrerequisites(benchmark_config): """Verifies that the required resources are present. Args: benchmark_config: The config used to construct the BenchmarkSpec. Raises: InvalidValue: On encountering invalid configuration. """ dpb_service_type = benchmark_config.dpb_service.service_type if dp...
Verifies that the required resources are present. Args: benchmark_config: The config used to construct the BenchmarkSpec. Raises: InvalidValue: On encountering invalid configuration.
CheckPrerequisites
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_testdfsio_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_testdfsio_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Runs testdfsio benchmark and reports the results. Args: benchmark_spec: Spec needed to run the testdfsio benchmark Returns: A list of samples """ service = benchmark_spec.dpb_service if FLAGS.dfsio_fs == dpb_constants.HDFS_FS: base_dir = 'hdfs:/dfsio' elif servic...
Runs testdfsio benchmark and reports the results. Args: benchmark_spec: Spec needed to run the testdfsio benchmark Returns: A list of samples
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_testdfsio_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_testdfsio_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Make the jarfile available if using Dataflow.""" dpb_service_instance = benchmark_spec.dpb_service storage_service = dpb_service_instance.storage_service benchmark_spec.dpb_wordcount_jarfile = FLAGS.dpb_job_jarfile if dpb_service_instance.SERVICE_TYPE == dpb_constants.DATAFLOW:...
Make the jarfile available if using Dataflow.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_wordcount_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_wordcount_benchmark.py
Apache-2.0
def _GetJobArguments(dpb_service_type): """Returns the arguments for word count job based on runtime service.""" if dpb_service_type not in WORD_COUNT_CONFIGURATION: raise NotImplementedError else: return WORD_COUNT_CONFIGURATION[dpb_service_type]
Returns the arguments for word count job based on runtime service.
_GetJobArguments
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpb_wordcount_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpb_wordcount_benchmark.py
Apache-2.0
def Prepare(benchmark_spec: bm_spec.BenchmarkSpec) -> None: """Prepares both VM's to run DPDK Pktgen. Args: benchmark_spec: The benchmark specification. """ sender_vm, receiver_vm = benchmark_spec.vms[:2] background_tasks.RunThreaded( lambda vm: vm.Install('dpdk_pktgen'), [sender_vm, receiver...
Prepares both VM's to run DPDK Pktgen. Args: benchmark_spec: The benchmark specification.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpdk_pktgen_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpdk_pktgen_benchmark.py
Apache-2.0
def PrepareVM( vm: linux_virtual_machine.BaseLinuxVirtualMachine, sender_vm_ip: str, sender_vm_mac: str, receiver_vm_ip: str, receiver_vm_mac: str, ) -> None: """Prepares a VM to run DPDK Pktgen.""" vm.PushDataFile( 'dpdk_pktgen/pktgen.pkt', f'{dpdk_pktgen.DPDK_PKTGEN_GIT_REPO_DIR}/p...
Prepares a VM to run DPDK Pktgen.
PrepareVM
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpdk_pktgen_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpdk_pktgen_benchmark.py
Apache-2.0
def Run(benchmark_spec: bm_spec.BenchmarkSpec) -> list[sample.Sample]: """Runs DPDK benchmarks. Args: benchmark_spec: The benchmark specification. Returns: A list of sample.Sample objects with the performance results. Raises: RunError: A run-stage error raised by an individual benchmark. """ ...
Runs DPDK benchmarks. Args: benchmark_spec: The benchmark specification. Returns: A list of sample.Sample objects with the performance results. Raises: RunError: A run-stage error raised by an individual benchmark.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpdk_pktgen_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpdk_pktgen_benchmark.py
Apache-2.0
def Prepare(benchmark_spec: bm_spec.BenchmarkSpec) -> None: """Prepares both VM's to run DPDK. This include Hugepage allocation, dpdk installation, and binding the secondary NIC to a DPDK-compatible driver. Args: benchmark_spec: The benchmark specification. """ client_vm, server_vm = benchmark_spec.vm...
Prepares both VM's to run DPDK. This include Hugepage allocation, dpdk installation, and binding the secondary NIC to a DPDK-compatible driver. Args: benchmark_spec: The benchmark specification.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpdk_testpmd_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpdk_testpmd_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec: bm_spec.BenchmarkSpec) -> None: """Cleanup benchmarks on the target vm. Args: benchmark_spec: The benchmark specification. """ client_vm, server_vm = benchmark_spec.vms[:2] dpdk_git_repo_dir = _GetDirFromRepo(dpdk.DPDK_GIT_REPO) dpdk_driver_git_repo_dir = _GetDirFromRepo(dpd...
Cleanup benchmarks on the target vm. Args: benchmark_spec: The benchmark specification.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/dpdk_testpmd_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/dpdk_testpmd_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install script execution environment on the client vm. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ benchmark_spec.always_call_cleanup = True edw_service_instance = benchmark_spec.edw_service vm = b...
Install script execution environment on the client vm. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/edw_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/edw_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run phase executes the sql scripts on edw cluster and collects duration.""" results = [] edw_service_instance = benchmark_spec.edw_service client_interface = edw_service_instance.GetClientInterface() # Run a warm up query in case there are cold start issues. client_interface.Wa...
Run phase executes the sql scripts on edw cluster and collects duration.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/edw_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/edw_benchmark.py
Apache-2.0
def _InstallEsrally(vm, master_nodes, seed_hosts, is_load_generator=False): """Install esrally on the target vm. Args: vm: The VM to install esrally on. master_nodes: comma separated string of the cluster's vm names. seed_hosts: comma separated string of the cluster's internal IPs. is_load_generato...
Install esrally on the target vm. Args: vm: The VM to install esrally on. master_nodes: comma separated string of the cluster's vm names. seed_hosts: comma separated string of the cluster's internal IPs. is_load_generator: Whether the vm is a load generator.
_InstallEsrally
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/esrally_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/esrally_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Installs dependencies and setups up esrally cluster. Args: benchmark_spec: The benchmark specification. """ client_vm = benchmark_spec.vm_groups['clients'][0] server_vms = benchmark_spec.vm_groups['servers'] master_nodes = ','.join(vm.name for vm in server_vms) seed_ho...
Installs dependencies and setups up esrally cluster. Args: benchmark_spec: The benchmark specification.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/esrally_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/esrally_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Runs esrally on the target vm. Args: benchmark_spec: The benchmark specification. Returns: A list of sample.Sample objects with the performance results. Raises: Benchmarks.RunError: If no results are found. """ client_vm = benchmark_spec.vm_groups['clients'][0] s...
Runs esrally on the target vm. Args: benchmark_spec: The benchmark specification. Returns: A list of sample.Sample objects with the performance results. Raises: Benchmarks.RunError: If no results are found.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/esrally_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/esrally_benchmark.py
Apache-2.0
def Prepare(benchmark_spec: bm_spec.BenchmarkSpec): """Prepares the VMs and other resources for running the benchmark. This is a good place to download binaries onto the VMs, create any data files needed for a benchmark run, etc. Args: benchmark_spec: The benchmark spec for this sample benchmark. """ ...
Prepares the VMs and other resources for running the benchmark. This is a good place to download binaries onto the VMs, create any data files needed for a benchmark run, etc. Args: benchmark_spec: The benchmark spec for this sample benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/example_preprovision_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/example_preprovision_benchmark.py
Apache-2.0
def Run(benchmark_spec: bm_spec.BenchmarkSpec) -> list[sample.Sample]: """Runs the benchmark and returns a dict of performance data. It must be possible to run the benchmark multiple times after the Prepare stage. Args: benchmark_spec: The benchmark spec for this sample benchmark. Returns: A list o...
Runs the benchmark and returns a dict of performance data. It must be possible to run the benchmark multiple times after the Prepare stage. Args: benchmark_spec: The benchmark spec for this sample benchmark. Returns: A list of performance samples.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/example_preprovision_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/example_preprovision_benchmark.py
Apache-2.0
def _Prepare(vm): """Mount gcsfuse and set up the test script.""" # Set up the test script path = data.ResourcePath(os.path.join(_REMOTE_SCRIPTS_DIR, _REMOTE_SCRIPT)) logging.info('Uploading %s to %s', path, vm) vm.PushFile(path, _REMOTE_SCRIPT) vm.RemoteCommand(f'sudo chmod 755 {_REMOTE_SCRIPT}')
Mount gcsfuse and set up the test script.
_Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gcsfuse_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gcsfuse_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Read the files concurrently and measure the throughput. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample instances. """ vms = benchmark_spec.vms gfile_sample_lists = backgr...
Read the files concurrently and measure the throughput. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample instances.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gcsfuse_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gcsfuse_benchmark.py
Apache-2.0
def _ReadThroughputTest(vm, mountpoint): """Read the files in the directory via tf.io.gfile or gcsfuse.""" data_dir = FLAGS.gcsfuse_data_dir options = f'--mountpoint="{mountpoint}"' cmd = f'gsutil ls "{data_dir}" | {_DLVM_PYTHON} {_REMOTE_SCRIPT} {options}' logging.info(cmd) stdout, stderr = vm.RemoteComman...
Read the files in the directory via tf.io.gfile or gcsfuse.
_ReadThroughputTest
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gcsfuse_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gcsfuse_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install glibc on the target vms. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vms = benchmark_spec.vms vm = vms[0] PrepareGlibc(vm)
Install glibc on the target vms. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/glibc_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/glibc_benchmark.py
Apache-2.0
def GetCommonMetadata(benchmark_spec): """Update metadata with glibc-related flag values.""" metadata = dict() metadata['gcc'] = glibc.GetGccVersion(benchmark_spec.vms[0]) metadata['glibc_benchset'] = FLAGS.glibc_benchset metadata['glibc_version'] = glibc.GLIBC_VERSION metadata['num_machines'] = len(benchma...
Update metadata with glibc-related flag values.
GetCommonMetadata
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/glibc_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/glibc_benchmark.py
Apache-2.0
def HelperParseOutput(lst): """Self defined parameter function for 'object_pairs_hook' of json.loads(). Purpose: This function helps to parse json text with duplicate keys, for instance: json text: {"key":1, "key":2, "key2":3, "key2":4} With this function, we will have the following dict: {...
Self defined parameter function for 'object_pairs_hook' of json.loads(). Purpose: This function helps to parse json text with duplicate keys, for instance: json text: {"key":1, "key":2, "key2":3, "key2":4} With this function, we will have the following dict: {"key":[1, 2], "key2":[3, 4...
HelperParseOutput
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/glibc_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/glibc_benchmark.py
Apache-2.0
def ParseOutput(glibc_output, upper_key, results, metadata): """Parses the output from glibc. Args: glibc_output: A json format string containing the output of benchmark tests. upper_key: The first dimension key of the glibc_output dict. results: A list to which this function will append new samples ba...
Parses the output from glibc. Args: glibc_output: A json format string containing the output of benchmark tests. upper_key: The first dimension key of the glibc_output dict. results: A list to which this function will append new samples based on the glibc output. (in the same format as Run() return...
ParseOutput
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/glibc_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/glibc_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run Glibc on the cluster. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ vms = benchmark_spec.vms vm = vms[0] results = [] # Ensure that we can get comm...
Run Glibc on the cluster. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/glibc_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/glibc_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Set up GlusterFS and install fio. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ gluster_servers = benchmark_spec.vm_groups['gluster_servers'] clients = benchmark_spec.vm_groups['clients'] client_vm =...
Set up GlusterFS and install fio. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gluster_fio_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gluster_fio_benchmark.py
Apache-2.0
def _RunFio(vm, fio_params, metadata): """Run fio. Args: vm: Virtual machine to run fio on. fio_params: fio parameters used to create the fio command to run. metadata: Metadata to add to the results. Returns: A list of sample.Sample objects """ stdout, _ = vm.RemoteCommand( 'sudo {} {}...
Run fio. Args: vm: Virtual machine to run fio on. fio_params: fio parameters used to create the fio command to run. metadata: Metadata to add to the results. Returns: A list of sample.Sample objects
_RunFio
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gluster_fio_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gluster_fio_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run fio against gluster. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ gluster_servers = benchmark_spec.vm_groups['gluster_servers'] clients = benchmark_spe...
Run fio against gluster. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gluster_fio_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gluster_fio_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec): """Cleanup gluster. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ clients = benchmark_spec.vm_groups['clients'] gluster_servers = benchmark_spec.vm_groups['gluster_servers'] for client in clients: ...
Cleanup gluster. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gluster_fio_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gluster_fio_benchmark.py
Apache-2.0
def _ParseDeviceInfo(test_output): """Parses the GPU device info from the CUDA device bandwidth test output. Args: test_output: The resulting output string from the bandwidth test application. Returns: A dictionary mapping the device number to its name, for every device available on the system...
Parses the GPU device info from the CUDA device bandwidth test output. Args: test_output: The resulting output string from the bandwidth test application. Returns: A dictionary mapping the device number to its name, for every device available on the system.
_ParseDeviceInfo
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gpu_pcie_bandwidth_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gpu_pcie_bandwidth_benchmark.py
Apache-2.0
def _AverageResultsForSection(lines, results_section_header_index): """Return the average bandwidth for a specific section of results Args: lines: output of bandwidthTest, split by lines and stripped of whitespace results_section_header_index: line number of results section header. The actual results...
Return the average bandwidth for a specific section of results Args: lines: output of bandwidthTest, split by lines and stripped of whitespace results_section_header_index: line number of results section header. The actual results, in MB/s, should begin three lines after the header. Returns: ave...
_AverageResultsForSection
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gpu_pcie_bandwidth_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gpu_pcie_bandwidth_benchmark.py
Apache-2.0
def _FindIndexOfLineThatStartsWith(lines, str): """Return the index of the line that startswith str. Args: lines: iterable str: predicate to find in lines Returns: first index of the element in lines that startswith str Raises: InvalidBandwidthTestOutputFormat if str is not found """ for ...
Return the index of the line that startswith str. Args: lines: iterable str: predicate to find in lines Returns: first index of the element in lines that startswith str Raises: InvalidBandwidthTestOutputFormat if str is not found
_FindIndexOfLineThatStartsWith
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gpu_pcie_bandwidth_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gpu_pcie_bandwidth_benchmark.py
Apache-2.0
def _ParseOutputFromSingleIteration(test_output): """Parses the output of the CUDA device bandwidth test. Args: test_output: The resulting output string from the bandwidth test application. Returns: A dictionary containing the following values as floats: * the device to host bandwidth ...
Parses the output of the CUDA device bandwidth test. Args: test_output: The resulting output string from the bandwidth test application. Returns: A dictionary containing the following values as floats: * the device to host bandwidth * the host to device bandwidth * the device to de...
_ParseOutputFromSingleIteration
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/gpu_pcie_bandwidth_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/gpu_pcie_bandwidth_benchmark.py
Apache-2.0