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 StartCluster(server_vms) -> None: """Start redis cluster; assumes redis shards started with cluster mode.""" cluster_create_cmd = f'sudo {GetRedisDir()}/src/redis-cli --cluster create ' for server_vm in server_vms: cluster_create_cmd += f' {server_vm.internal_ip}:{DEFAULT_PORT}' stdout, _ = server_vms[0...
Start redis cluster; assumes redis shards started with cluster mode.
StartCluster
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/redis_server.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/redis_server.py
Apache-2.0
def AptInstall(vm: virtual_machine.BaseVirtualMachine) -> None: """Installs the s64da package on the VM.""" vm.Install('pip') cmds = [ ( 'wget ' f'https://github.com/swarm64/s64da-benchmark-toolkit/archive/refs/tags/{S64DA_VERSION}.tar.gz' ), f'tar -xf v{S64DA_VERSION}.tar.gz...
Installs the s64da package on the VM.
AptInstall
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/s64da.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/s64da.py
Apache-2.0
def RunBenchmark( vm: virtual_machine.BaseVirtualMachine, db: r_db.BaseRelationalDb, benchmark: str, oltp_workers: int, olap_workers: int, duration: int, olap_timeout: str, ramp_up_duration: int, run_on_replica: bool, ) -> List[sample.Sample]: """Runs the benchmark and gathers the ...
Runs the benchmark and gathers the data.
RunBenchmark
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/s64da.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/s64da.py
Apache-2.0
def SplitRampUpSamples( rows: List[OLTPRow], ramp_up_duration: int ) -> Tuple[List[OLTPRow], List[OLTPRow]]: """Splits samples before ramp up and after ramp up. The samples returned from the s64da benchmarks are in chronological order. Args: rows: Samples returned from the s64da benchmarks ramp_up_d...
Splits samples before ramp up and after ramp up. The samples returned from the s64da benchmarks are in chronological order. Args: rows: Samples returned from the s64da benchmarks ramp_up_duration: Time for the benchmark to rampup. Returns: Tuple of split samples.
SplitRampUpSamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/s64da.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/s64da.py
Apache-2.0
def _IsShocInstalled(vm): """Returns whether shoc is installed or not""" command = os.path.join(SHOC_BIN_DIR, 'shocdriver') resp, _ = vm.RemoteHostCommand('command -v %s' % command, ignore_failure=True) if resp.rstrip() == '': return False return True
Returns whether shoc is installed or not
_IsShocInstalled
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/shoc_benchmark_suite.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/shoc_benchmark_suite.py
Apache-2.0
def AptInstall(vm): """Installs the SHOC benchmark suite on the VM.""" if _IsShocInstalled(vm): return vm.InstallPackages(APT_PACKAGES) vm.Install('cuda_toolkit') vm.RemoteCommand( 'cd %s && git clone %s' % (linux_packages.INSTALL_DIR, SHOC_GIT_URL) ) vm.RemoteCommand( ( 'cd %s...
Installs the SHOC benchmark suite on the VM.
AptInstall
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/shoc_benchmark_suite.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/shoc_benchmark_suite.py
Apache-2.0
def _Install(vm): """Installs the Silo package on the VM.""" nthreads = vm.NumCpusForBenchmark() * 2 vm.Install('build_tools') vm.RemoteCommand('git clone {} {}'.format(GIT_REPO, SILO_DIR)) vm.RemoteCommand('cd {} && git checkout {}'.format(SILO_DIR, GIT_TAG)) # This is due to a failing clone command when e...
Installs the Silo package on the VM.
_Install
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/silo.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/silo.py
Apache-2.0
def Running(vm): """Check if any slurm job is running.""" output, _ = vm.RemoteCommand('sinfo') for line in output.splitlines(): if not line: continue status = line.split()[4] if status in ('alloc', 'mix'): return True return False
Check if any slurm job is running.
Running
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/slurm.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/slurm.py
Apache-2.0
def GetController(vms): """Return the controller vm. e.g. ip-10-0-0-[28,175], return vm with hostname ip-10-0-0-28 pkb-46b6c6e7-[0-1], return vm with hostname pkb-46b6c6e7-0 Args: vms: List of virtual machine objects. Returns: VirtualMachine object representing controller vm. Raises: Runtim...
Return the controller vm. e.g. ip-10-0-0-[28,175], return vm with hostname ip-10-0-0-28 pkb-46b6c6e7-[0-1], return vm with hostname pkb-46b6c6e7-0 Args: vms: List of virtual machine objects. Returns: VirtualMachine object representing controller vm. Raises: RuntimeError: if cannot find the co...
GetController
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/slurm.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/slurm.py
Apache-2.0
def AptInstall(vm): """Installs snowsql on the Debian VM.""" vm.Install('curl') vm.Install('unzip') vm.RemoteCommand('curl -O %s' % SNOWSQL_DOWNLOAD_URL) vm.RemoteCommand( 'SNOWSQL_DEST=%s SNOWSQL_LOGIN_SHELL=~/.profile ' 'bash snowsql-%s-linux_x86_64.bash' % (SNOWSQL_INSTALL_LOCATION, SNOWS...
Installs snowsql on the Debian VM.
AptInstall
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/snowsql.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/snowsql.py
Apache-2.0
def AptUninstall(vm): """Removes snowsql from the Debian VM.""" vm.RemoteCommand('rm -rf ~/bin/snowsql') vm.RemoteCommand('rm -rf ~/.snowsql') vm.RemoteCommand('rm -rf snowsql-%s-linux_x86_64.bash' % SNOWSQL_VERSION)
Removes snowsql from the Debian VM.
AptUninstall
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/snowsql.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/snowsql.py
Apache-2.0
def SparkVersion() -> version.Version: """Get passed Spark version or latest available.""" if _SPARK_VERSION_FLAG.value: return version.Version(_SPARK_VERSION_FLAG.value) # Find latest version # N.B. requests handles a redirect from spark to spark/. response = requests.get(SPARK_DOWNLOADS) if not respon...
Get passed Spark version or latest available.
SparkVersion
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/spark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/spark.py
Apache-2.0
def GetConfiguration( driver_memory_mb: int, worker_memory_mb: int, worker_cores: int, num_workers: int, configure_s3: bool = False, ) -> Dict[str, str]: """Calculate Spark configuration. Shared between VMs and k8s.""" conf = { SPARK_DRIVER_MEMORY: f'{driver_memory_mb}m', SPARK_WORKE...
Calculate Spark configuration. Shared between VMs and k8s.
GetConfiguration
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/spark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/spark.py
Apache-2.0
def _GetOnlineWorkerCount(leader): """Curl Spark Master Web UI for worker status.""" cmd = "curl http://localhost:8080 | grep 'Alive Workers' | grep -o '[0-9]\\+'" stdout = leader.RemoteCommand(cmd)[0] return int(stdout)
Curl Spark Master Web UI for worker status.
_GetOnlineWorkerCount
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/spark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/spark.py
Apache-2.0
def ConfigureAndStart(leader, workers, configure_s3=False): """Run Spark Standalone and HDFS on a cluster. Args: leader: VM. leader VM - will be the HDFS NameNode, Spark Master. workers: List of VMs. Each VM will run an HDFS DataNode, Spark Worker. configure_s3: Whether to configure Spark to access S3....
Run Spark Standalone and HDFS on a cluster. Args: leader: VM. leader VM - will be the HDFS NameNode, Spark Master. workers: List of VMs. Each VM will run an HDFS DataNode, Spark Worker. configure_s3: Whether to configure Spark to access S3.
ConfigureAndStart
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/spark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/spark.py
Apache-2.0
def _CheckTarFile(vm, runspec_config, examine_members, speccpu_vm_state): """Performs preliminary checks on the format of tar file downloaded on vm. Args: vm: virtual machine runspec_config: String. User-specified name of the config file that is expected to be in the tar file. examine_members: Bo...
Performs preliminary checks on the format of tar file downloaded on vm. Args: vm: virtual machine runspec_config: String. User-specified name of the config file that is expected to be in the tar file. examine_members: Boolean. If True, this function will examine the tar file's members to veri...
_CheckTarFile
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def _CheckIsoAndCfgFile(runspec_config, spec_iso, clang_flag): """Searches for the iso file and cfg file. Args: runspec_config: String. Name of the config file to provide to runspec. spec_iso: String. Location of spec iso file. clang_flag: String. Location of the clang flag file. Raises: data.Re...
Searches for the iso file and cfg file. Args: runspec_config: String. Name of the config file to provide to runspec. spec_iso: String. Location of spec iso file. clang_flag: String. Location of the clang flag file. Raises: data.ResourcePath: If one of the required files could not be found.
_CheckIsoAndCfgFile
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def UpdateConfig(self, scratch_dir): """Updates the configuration after other attributes have been set. Args: scratch_dir: The scratch directory on the VM that SPEC is installed on. """ if self.base_spec_dir is None: raise ValueError('base_spec_dir must be set.') self.spec_dir = posix...
Updates the configuration after other attributes have been set. Args: scratch_dir: The scratch directory on the VM that SPEC is installed on.
UpdateConfig
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def InstallSPECCPU(vm, speccpu_vm_state): """Installs SPEC CPU2006 or 2017 on the target vm. Args: vm: Vm on which speccpu is installed. speccpu_vm_state: SpecInstallConfigurations. Install configuration for spec. """ scratch_dir = vm.GetScratchDir() vm.RemoteCommand('chmod 755 {}'.format(scratch_dir...
Installs SPEC CPU2006 or 2017 on the target vm. Args: vm: Vm on which speccpu is installed. speccpu_vm_state: SpecInstallConfigurations. Install configuration for spec.
InstallSPECCPU
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def _PrepareWithPreprovisionedTarFile(vm, speccpu_vm_state): """Prepares the VM to run using tar file in preprovisioned cloud. Args: vm: BaseVirtualMachine. Vm on which the tar file is installed. speccpu_vm_state: SpecInstallConfigurations. Install configuration for spec. """ scratch_dir = vm.GetScratc...
Prepares the VM to run using tar file in preprovisioned cloud. Args: vm: BaseVirtualMachine. Vm on which the tar file is installed. speccpu_vm_state: SpecInstallConfigurations. Install configuration for spec.
_PrepareWithPreprovisionedTarFile
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def _PrepareWithIsoFile(vm, speccpu_vm_state): """Prepares the VM to run using the iso file. Copies the iso to the VM, mounts it, and extracts the contents. Copies the config file to the VM. Runs the SPEC install.sh script on the VM. Args: vm: BaseVirtualMachine. Recipient of the iso file. speccpu_vm_...
Prepares the VM to run using the iso file. Copies the iso to the VM, mounts it, and extracts the contents. Copies the config file to the VM. Runs the SPEC install.sh script on the VM. Args: vm: BaseVirtualMachine. Recipient of the iso file. speccpu_vm_state: SpecInstallConfigurations. Modified by this f...
_PrepareWithIsoFile
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def _ExtractScore(stdout, vm, keep_partial_results, runspec_metric): """Extracts the SPEC(int|fp) score from stdout. Args: stdout: String. stdout from running RemoteCommand. vm: The vm instance where SPEC CPU was run. keep_partial_results: Boolean. True if partial results should be extracted in t...
Extracts the SPEC(int|fp) score from stdout. Args: stdout: String. stdout from running RemoteCommand. vm: The vm instance where SPEC CPU was run. keep_partial_results: Boolean. True if partial results should be extracted in the event that not all benchmarks were successfully run. See the "run...
_ExtractScore
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def _GeometricMean(arr): """Calculates the geometric mean of the array.""" product = 1 for val in arr: product *= val return product ** (1.0 / len(arr))
Calculates the geometric mean of the array.
_GeometricMean
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def ParseOutput( vm, log_files, is_partial_results, runspec_metric, results_directory=None ): """Retrieves the SPEC CPU output from the VM and parses it. Args: vm: Vm. The vm instance where SPEC CPU was run. log_files: String. Path of the directory on the remote machine where the SPEC files, incl...
Retrieves the SPEC CPU output from the VM and parses it. Args: vm: Vm. The vm instance where SPEC CPU was run. log_files: String. Path of the directory on the remote machine where the SPEC files, including binaries and logs, are located. is_partial_results: Boolean. True if the output is partial re...
ParseOutput
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def Run(vm, cmd, benchmark_subset, version_specific_parameters=None): """Runs SPEC CPU on the target vm. Args: vm: Vm. The vm on which speccpu will run. cmd: command to issue. benchmark_subset: List. Subset of the benchmark to run. version_specific_parameters: List. List of parameters for specific ...
Runs SPEC CPU on the target vm. Args: vm: Vm. The vm on which speccpu will run. cmd: command to issue. benchmark_subset: List. Subset of the benchmark to run. version_specific_parameters: List. List of parameters for specific versions. Returns: A Tuple of (stdout, stderr) the run output.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def Uninstall(vm): """Cleans up SPECCPU from the target vm. Args: vm: The vm on which SPECCPU is uninstalled. """ speccpu_vm_state = getattr(vm, VM_STATE_ATTR, None) if speccpu_vm_state: if speccpu_vm_state.mount_dir: try: vm.RemoteCommand('sudo umount {}'.format(speccpu_vm_state.mount_...
Cleans up SPECCPU from the target vm. Args: vm: The vm on which SPECCPU is uninstalled.
Uninstall
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu.py
Apache-2.0
def GetSpecInstallConfig(scratch_dir): """Returns a SpecInstallConfigurations() for SPEC CPU 2006. Args: scratch_dir: The scratch directory on the VM that SPEC is installed on. """ install_config = speccpu.SpecInstallConfigurations() install_config.package_name = _PACKAGE_NAME install_config.base_mount...
Returns a SpecInstallConfigurations() for SPEC CPU 2006. Args: scratch_dir: The scratch directory on the VM that SPEC is installed on.
GetSpecInstallConfig
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu2006.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu2006.py
Apache-2.0
def GetSpecInstallConfig(scratch_dir): """Returns a SpecInstallConfigurations() for SPEC CPU 2017. Args: scratch_dir: The scratch directory on the VM that SPEC is installed on. """ install_config = speccpu.SpecInstallConfigurations() install_config.package_name = _PACKAGE_NAME install_config.base_mount...
Returns a SpecInstallConfigurations() for SPEC CPU 2017. Args: scratch_dir: The scratch directory on the VM that SPEC is installed on.
GetSpecInstallConfig
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/speccpu2017.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/speccpu2017.py
Apache-2.0
def Uninstall(vm) -> None: """Cleanup Specjbb on the target vm.""" if _MOUNT_SPECJBB_ISO.value: vm.RemoteCommand(f'sudo umount {SPEC_DIR}', ignore_failure=True) vm.RemoteCommand( f'rm -rf {SPEC_DIR} {SPEC_JBB_2015_ISO}', ignore_failure=True )
Cleanup Specjbb on the target vm.
Uninstall
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/specjbb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/specjbb.py
Apache-2.0
def Install(vm): """Installs the swiftclient package on the VM.""" # Upgrade to latest urllib3 version fixes SSL SNMI error vm.Install('pip') vm.InstallPackages('python-dev python-urllib3') vm.RemoteCommand('sudo pip install python-keystoneclient') vm.RemoteCommand('sudo pip install python-swiftclient')
Installs the swiftclient package on the VM.
Install
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/swift_client.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/swift_client.py
Apache-2.0
def _Install(vm, spanner_oltp=False, args=immutabledict.immutabledict()): """Installs the sysbench package on the VM.""" vm.RemoteCommand(f'sudo rm -rf {SYSBENCH_DIR}') if SYSBENCH_VERSION.value in RELEASE_TAGS: vm.RemoteCommand( f'git clone {GIT_REPO} {SYSBENCH_DIR} --branch {SYSBENCH_VERSION.value}'...
Installs the sysbench package on the VM.
_Install
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/sysbench.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/sysbench.py
Apache-2.0
def ParseSysbenchTimeSeries(sysbench_output, metadata) -> list[sample.Sample]: """Parses sysbench output. Extract relevant TPS and latency numbers, and populate the final result collection with these information. Specifically, we are interested in tps and latency numbers reported by each reporting interval....
Parses sysbench output. Extract relevant TPS and latency numbers, and populate the final result collection with these information. Specifically, we are interested in tps and latency numbers reported by each reporting interval. Args: sysbench_output: The output from sysbench. metadata: Metadata of t...
ParseSysbenchTimeSeries
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/sysbench.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/sysbench.py
Apache-2.0
def GetSysbenchDatabaseFlags( db_driver: str, db_user: str, db_password: str, db_name: str, host_ip: str, ssl_setting: str | None = None, # only available in sysbench ver 1.1+ port: int | None = None, ) -> list[str]: """Returns the database flags for sysbench.""" if db_driver == 'mysql'...
Returns the database flags for sysbench.
GetSysbenchDatabaseFlags
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/sysbench.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/sysbench.py
Apache-2.0
def Install(vm): """Installs the tailbench dependencies and sets up the package on the VM.""" # TODO(user): Rework all of this to use vm.Install to make more robust vm.InstallPackages( 'libopencv-dev autoconf ant libtcmalloc-minimal4 swig google-perftools' ' bzip2 libnuma-dev libjemalloc-dev libgoogle...
Installs the tailbench dependencies and sets up the package on the VM.
Install
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tailbench.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tailbench.py
Apache-2.0
def PrepareTailBench(vm): """Set up tailbench on the VM by setting the config files. Args: vm: The VM in which we are setting up the TailBench config. """ vm.RemoteCommand( f'echo "{CONFIGS_SH_CONTENTS}" > "{INSTALL_DIR}"/{TAILBENCH}/configs.sh' ) vm.RemoteCommand( f'echo "{MAKEFILE_CONFIG_...
Set up tailbench on the VM by setting the config files. Args: vm: The VM in which we are setting up the TailBench config.
PrepareTailBench
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tailbench.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tailbench.py
Apache-2.0
def _ParseResultsFile(input_file, name='') -> List[_TestResult]: """Reads from the file and returns a histogram. Args: input_file: a string input file name. name: name of the test run that generated the file Returns: A list of TestResults, each with a histogram representing different types of la...
Reads from the file and returns a histogram. Args: input_file: a string input file name. name: name of the test run that generated the file Returns: A list of TestResults, each with a histogram representing different types of latency values mapped to their number of occurrences in the results file...
_ParseResultsFile
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tailbench.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tailbench.py
Apache-2.0
def BuildHistogramSamples( input_file, name='', metric='', additional_metadata=None ) -> List[sample.Sample]: """Builds a list of samples for a the results of a test. Args: input_file: a string input file name. name: name of the test run that generated the file metric: String. Metric name to use. ...
Builds a list of samples for a the results of a test. Args: input_file: a string input file name. name: name of the test run that generated the file metric: String. Metric name to use. additional_metadata: dict. Additional metadata attaching to Sample. Returns: samples: List of sample objects ...
BuildHistogramSamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tailbench.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tailbench.py
Apache-2.0
def RunTailbench(vm, tailbench_tests): """Runs up tailbench on the VM. Args: vm: The VM that we wish to run tailbench on. tailbench_tests: A command line flag that determines which tailbench tests we wish to run. """ vm.RemoteCommand(f'{INSTALL_DIR}/{TAILBENCH}/build.sh harness') for test in ta...
Runs up tailbench on the VM. Args: vm: The VM that we wish to run tailbench on. tailbench_tests: A command line flag that determines which tailbench tests we wish to run.
RunTailbench
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tailbench.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tailbench.py
Apache-2.0
def AptInstall(vm): """Installs the tcmalloc shared library on a Debian VM.""" if FLAGS.tcmalloc_version == 'off': return # Write tcmalloc settings as environment variables settings = FLAGS.tcmalloc_settings.split(',') for setting in settings: if setting: vm.RemoteCommand( 'echo "expo...
Installs the tcmalloc shared library on a Debian VM.
AptInstall
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tcmalloc.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tcmalloc.py
Apache-2.0
def GetEnvironmentVars(vm): """Return a string containing TensorFlow-related environment variables. Args: vm: vm to get environment varibles Returns: string of environment variables """ env_vars = [] if nvidia_driver.CheckNvidiaGpuExists(vm): output, _ = vm.RemoteCommand('getconf LONG_BIT') ...
Return a string containing TensorFlow-related environment variables. Args: vm: vm to get environment varibles Returns: string of environment variables
GetEnvironmentVars
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tensorflow.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tensorflow.py
Apache-2.0
def GetTensorFlowVersion(vm): """Returns the version of tensorflow installed on the vm. Args: vm: the target vm on which to check the tensorflow version Returns: installed python tensorflow version as a string """ stdout, _ = vm.RemoteCommand( 'echo -e "import tensorflow\nprint(tensorflow.__ve...
Returns the version of tensorflow installed on the vm. Args: vm: the target vm on which to check the tensorflow version Returns: installed python tensorflow version as a string
GetTensorFlowVersion
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tensorflow.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tensorflow.py
Apache-2.0
def Install(vm): """Installs TensorFlow models on the VM.""" vm.InstallPackages('git') vm.RemoteCommand('git clone {}'.format(TF_MODELS_GIT)) vm.RemoteCommand( 'cd models && git checkout {}'.format(FLAGS.tensorflow_models_commit_hash) )
Installs TensorFlow models on the VM.
Install
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tensorflow_models.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tensorflow_models.py
Apache-2.0
def InstallTensorFlowServingAPI(vm): """Installs TF Serving API on the vm. Currently this is only useful so that the clients can run python scripts that import tensorflow_serving. The server vms make no use of it. Args: vm: VM to operate on. """ pip_package_output_dir = posixpath.join(VM_TMP_DIR, '...
Installs TF Serving API on the vm. Currently this is only useful so that the clients can run python scripts that import tensorflow_serving. The server vms make no use of it. Args: vm: VM to operate on.
InstallTensorFlowServingAPI
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tensorflow_serving.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tensorflow_serving.py
Apache-2.0
def BuildDockerImages(vm): """Builds the Docker images from source Dockerfiles for a pre-built env.""" vm.InstallPackages('git') vm.RemoteHostCommand( 'cd {} && git clone -b {} https://github.com/tensorflow/serving'.format( linux_packages.INSTALL_DIR, FLAGS.tf_serving_branch ) ) setup_...
Builds the Docker images from source Dockerfiles for a pre-built env.
BuildDockerImages
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tensorflow_serving.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tensorflow_serving.py
Apache-2.0
def Uninstall(vm): """Uninstalls TensorFlow Serving on the VM.""" vm.RemoteCommand('sudo pip uninstall -y tensorflow_serving_api') vm.RemoteHostCommand('sudo docker rmi benchmarks/tensorflow-serving') vm.RemoteHostCommand('sudo docker rmi benchmarks/tensorflow-serving-devel') del vm
Uninstalls TensorFlow Serving on the VM.
Uninstall
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tensorflow_serving.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tensorflow_serving.py
Apache-2.0
def YumInstall(vm): """Installs the texinfo package on the VM.""" if vm.OS_TYPE == os_types.ROCKY_LINUX8: vm.RemoteCommand('sudo dnf config-manager --set-enabled powertools') elif vm.OS_TYPE == os_types.ROCKY_LINUX9: vm.RemoteCommand('sudo dnf config-manager --set-enabled crb') elif vm.OS_TYPE == os_typ...
Installs the texinfo package on the VM.
YumInstall
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/texinfo.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/texinfo.py
Apache-2.0
def Install(vm): """Installs the tuned package on the VM.""" vm.InstallPackages('tuned') vm.RemoteCommand('sudo systemctl enable --now tuned')
Installs the tuned package on the VM.
Install
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/tuned.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/tuned.py
Apache-2.0
def _Install(vm): """Installs the UnixBench package on the VM.""" vm.Install('build_tools') vm.Install('wget') vm.RemoteCommand( 'wget {} -P {}'.format(UNIXBENCH_URL, linux_packages.INSTALL_DIR) ) vm.RemoteCommand( 'cd {} && tar xvzf {}'.format(linux_packages.INSTALL_DIR, UNIXBENCH_TAR) )
Installs the UnixBench package on the VM.
_Install
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/unixbench.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/unixbench.py
Apache-2.0
def _ParseOutput(output_text): """Parses the output of _LUA_SCRIPT_NAME. Yields: (variable_name, value, unit) tuples. """ if _CSV_PREFIX not in output_text: raise ValueError('{} not found in\n{}'.format(_CSV_PREFIX, output_text)) csv_fp = six.StringIO(str(output_text).rsplit(_CSV_PREFIX, 1)[-1]) re...
Parses the output of _LUA_SCRIPT_NAME. Yields: (variable_name, value, unit) tuples.
_ParseOutput
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/wrk.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/wrk.py
Apache-2.0
def Run(vm, target, connections=1, duration=60): """Runs wrk against a given target. Args: vm: Virtual machine. target: URL to fetch. connections: Number of concurrent connections. duration: Duration of the test, in seconds. Yields: sample.Sample objects with results. """ threads = min(c...
Runs wrk against a given target. Args: vm: Virtual machine. target: URL to fetch. connections: Number of concurrent connections. duration: Duration of the test, in seconds. Yields: sample.Sample objects with results.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/wrk.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/wrk.py
Apache-2.0
def _ParseOutput(output_text): """Parses the output of wrk2. Args: output_text: str. Output for wrk2 Yields: (variable_name, value, unit) tuples. Raises: ValueError: When requests / latency statistics cannot be found. """ inner_pat = r'^\s*(\d+\.\d+)%\s+(\d+\.\d+)(us|ms|s|m)\s*\n' regex = r...
Parses the output of wrk2. Args: output_text: str. Output for wrk2 Yields: (variable_name, value, unit) tuples. Raises: ValueError: When requests / latency statistics cannot be found.
_ParseOutput
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/wrk2.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/wrk2.py
Apache-2.0
def Run( vm, target, rate, connections=1, duration=60, script_path=None, threads=None ): """Runs wrk against a given target. Args: vm: Virtual machine. target: URL to fetch. rate: int. Target request rate, in QPS. connections: Number of concurrent connections. duration: Duration of the test...
Runs wrk against a given target. Args: vm: Virtual machine. target: URL to fetch. rate: int. Target request rate, in QPS. connections: Number of concurrent connections. duration: Duration of the test, in seconds. script_path: If specified, a lua script to execute. threads: Number of threa...
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/wrk2.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/wrk2.py
Apache-2.0
def GetXgboostVersion(vm): """Returns the XGBoost version installed on the vm. Args: vm: the target vm on which to check the XGBoost version Returns: Installed python XGBoost version as a string """ stdout, _ = vm.RemoteCommand( 'echo -e "import xgboost\nprint(xgboost.__version__)" | ' f...
Returns the XGBoost version installed on the vm. Args: vm: the target vm on which to check the XGBoost version Returns: Installed python XGBoost version as a string
GetXgboostVersion
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/xgboost.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/xgboost.py
Apache-2.0
def _GetVersionFromUrl(url: str) -> int: """Returns the version from ycsb url string. Args: url: ycsb url string with format 'https://github.com/brianfrankcooper/YCSB/releases/' 'download/0.<version>.0/ycsb-0.<version>.0.tar.gz' OR 'https://storage.googleapis.com/<ycsb_client_jar>/ycsb-0.<ver...
Returns the version from ycsb url string. Args: url: ycsb url string with format 'https://github.com/brianfrankcooper/YCSB/releases/' 'download/0.<version>.0/ycsb-0.<version>.0.tar.gz' OR 'https://storage.googleapis.com/<ycsb_client_jar>/ycsb-0.<version>.0.tar.gz' OR 'https://storag...
_GetVersionFromUrl
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _GetThreadsQpsPerLoaderList(num_vms: int) -> list[list[int]]: """Returns the list of [client, qps] per VM to use in staircase load.""" def _FormatThreadQps(thread_qps: str) -> list[int]: thread_qps_pair = thread_qps.split(':') if len(thread_qps_pair) == 1: target = int(_TARGET_QPS.value / num_vms...
Returns the list of [client, qps] per VM to use in staircase load.
_GetThreadsQpsPerLoaderList
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _GetRunParameters() -> dict[str, str]: """Returns a dict of params from the --ycsb_run_parameters flag.""" result = {} for kv in FLAGS.ycsb_run_parameters: param, value = kv.split('=', 1) result[param] = value return result
Returns a dict of params from the --ycsb_run_parameters flag.
_GetRunParameters
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def CheckPrerequisites(): """Verifies that the workload files are present and parameters are valid. Raises: IOError: On missing workload file. errors.Config.InvalidValue on unsupported YCSB version or configs. """ for workload_file in GetWorkloadFileList(): if not os.path.exists(workload_file): ...
Verifies that the workload files are present and parameters are valid. Raises: IOError: On missing workload file. errors.Config.InvalidValue on unsupported YCSB version or configs.
CheckPrerequisites
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def Install(vm): """Installs the YCSB and, if needed, hdrhistogram package on the VM.""" vm.Install('openjdk') # TODO(user): replace with Python 3 when # https://github.com/brianfrankcooper/YCSB/commit/f8e7c64 is released in a # version vm.InstallPackages('python2.7 curl') # ycsb.py uses /usr/bin/env pyth...
Installs the YCSB and, if needed, hdrhistogram package on the VM.
Install
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def ParseWorkload(contents): """Parse a YCSB workload file. YCSB workloads are Java .properties format. http://en.wikipedia.org/wiki/.properties This function does not support all .properties syntax, in particular escaped newlines. Args: contents: str. Contents of the file. Returns: dict mappin...
Parse a YCSB workload file. YCSB workloads are Java .properties format. http://en.wikipedia.org/wiki/.properties This function does not support all .properties syntax, in particular escaped newlines. Args: contents: str. Contents of the file. Returns: dict mapping from property key to property va...
ParseWorkload
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def PushWorkload(vm, workload_file, remote_path): """Pushes the workload file to the VM.""" if os.path.basename(remote_path): vm.RemoteCommand('sudo rm -f ' + remote_path) vm.PushFile(workload_file, remote_path)
Pushes the workload file to the VM.
PushWorkload
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _default_preload_threads(self): """The default number of threads to use for pre-populating the DB.""" if FLAGS['ycsb_preload_threads'].present: return FLAGS.ycsb_preload_threads return DEFAULT_PRELOAD_THREADS
The default number of threads to use for pre-populating the DB.
_default_preload_threads
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _LoadThreaded(self, vms, workload_file, **kwargs): """Runs "Load" in parallel for each VM in VMs. Args: vms: List of virtual machine instances. client nodes. workload_file: YCSB Workload file to use. **kwargs: Additional key-value parameters to pass to YCSB. Returns: List of sa...
Runs "Load" in parallel for each VM in VMs. Args: vms: List of virtual machine instances. client nodes. workload_file: YCSB Workload file to use. **kwargs: Additional key-value parameters to pass to YCSB. Returns: List of sample.Sample objects. Raises: IOError: If number of r...
_LoadThreaded
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _Run(self, vm, **kwargs): """Run a single workload from a client vm.""" for pv in FLAGS.ycsb_run_parameters: param, value = pv.split('=', 1) kwargs[param] = value command = self._BuildCommand('run', **kwargs) # YCSB version greater than 0.7.0 output some of the # info we need to stde...
Run a single workload from a client vm.
_Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _Run(loader_index): """Run YCSB on an individual VM.""" vm = vms[loader_index] params = copy.deepcopy(kwargs) params['target'] = targets[loader_index] if self.perclientparam is not None: params.update(self.perclientparam[loader_index]) if self.shardkeyspace: start...
Run YCSB on an individual VM.
_Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def RunStaircaseLoads(self, vms, workloads, **kwargs): """Run each workload in 'workloads' in succession. A staircase load is applied for each workload file, for each entry in ycsb_threads_per_client. Args: vms: List of VirtualMachine objects to generate load from. workloads: List of workl...
Run each workload in 'workloads' in succession. A staircase load is applied for each workload file, for each entry in ycsb_threads_per_client. Args: vms: List of VirtualMachine objects to generate load from. workloads: List of workload file names. **kwargs: Additional parameters to pass ...
RunStaircaseLoads
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def Run( self, vms, workloads=None, run_kwargs=None, database=None ) -> list[sample.Sample]: """Runs each workload/client count combination.""" if FLAGS.ycsb_skip_run_stage: return [] workloads = workloads or GetWorkloadFileList() assert workloads, 'no workloads' if not run_kwargs: ...
Runs each workload/client count combination.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _RunBurstMode(self, vms, workloads, run_kwargs=None): """Runs YCSB in burst mode, where the second run has increased QPS.""" run_params = _GetRunParameters() initial_qps = int(run_params.get('target', 0)) samples = list(self.RunStaircaseLoads(vms, workloads, **run_kwargs)) # Attach metadata for...
Runs YCSB in burst mode, where the second run has increased QPS.
_RunBurstMode
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _RunIncrementalMode( self, vms: Sequence[virtual_machine.VirtualMachine], workloads: Sequence[str], run_kwargs: Mapping[str, str] = None, ) -> list[sample.Sample]: """Runs YCSB by gradually incrementing target QPS. Note that this requires clients to be overprovisioned, as the targ...
Runs YCSB by gradually incrementing target QPS. Note that this requires clients to be overprovisioned, as the target QPS for YCSB is generally a "throttling" mechanism where the threads try to send as much QPS as possible and then get throttled. If clients are underprovisioned then it's possible for th...
_RunIncrementalMode
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _RunLowestLatencyMode( self, vms: Sequence[virtual_machine.VirtualMachine], workloads: Sequence[str], run_kwargs: Mapping[str, str] = None, database: resource.BaseResource = None, ) -> list[sample.Sample]: """Finds the lowest sustainable latency of the target. Args: vm...
Finds the lowest sustainable latency of the target. Args: vms: The client VMs to generate the load. workloads: List of workloads to run. run_kwargs: Extra run arguments. database: Database resource to run against. Returns: A list of samples of benchmark results.
_RunLowestLatencyMode
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _RunWorkload(target_qps: int) -> list[sample.Sample]: """Runs the workload at the target throughput.""" run_params = _GetRunParameters() run_params['target'] = target_qps self._SetClientThreadCount( min(target_qps, int(FLAGS.ycsb_threads_per_client[0])) ) self._SetRunPa...
Runs the workload at the target throughput.
_RunWorkload
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _ProcessSamples( samples: list[sample.Sample], database: resource.BaseResource ) -> list[sample.Sample]: """Attaches useful metadata to the result samples.""" end_timestamp = datetime.datetime.fromtimestamp( samples[0].timestamp, tz=datetime.timezone.utc ) cpu_utilizati...
Attaches useful metadata to the result samples.
_ProcessSamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _RunCpuMode( self, vms: list[virtual_machine.VirtualMachine], workloads: Sequence[str], run_kwargs: Mapping[str, Any], database: resource.BaseResource, ) -> list[sample.Sample]: """Runs YCSB until the CPU utilization is over the recommended amount. Args: vms: The clien...
Runs YCSB until the CPU utilization is over the recommended amount. Args: vms: The client VMs that will be used to push the load. workloads: List of workloads to run. run_kwargs: A mapping of additional YCSB run args to pass to the test. database: This class must implement CalculateTheoreti...
_RunCpuMode
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _GetReadAndUpdateProportion(workload: str) -> tuple[float, float]: """Gets the starting throughput to start the test with.""" with open(workload) as f: workload_args = ParseWorkload(f.read()) return float(workload_args['readproportion']), float( workload_args['updateproportion'] ...
Gets the starting throughput to start the test with.
_GetReadAndUpdateProportion
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _ExecuteWorkload(target_qps: int) -> list[sample.Sample]: """Executes the workload after setting run-specific args.""" run_kwargs['target'] = target_qps run_kwargs['maxexecutiontime'] = ( CPU_OPTIMIZATION_INCREMENT_MINS.value * 60 ) return self.RunStaircaseLoads(vms, workload...
Executes the workload after setting run-specific args.
_ExecuteWorkload
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _RunCpuModeSingleWorkload(workload: str) -> list[sample.Sample]: """Runs the CPU utilization test for a single workload.""" read_percent, update_percent = _GetReadAndUpdateProportion(workload) theoretical_max_qps = database.CalculateTheoreticalMaxThroughput( read_percent, update_percent ...
Runs the CPU utilization test for a single workload.
_RunCpuModeSingleWorkload
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _RunLatencyThresholdMode( self, vms: list[virtual_machine.VirtualMachine], workload: str, run_kwargs: Mapping[str, Any], ) -> list[sample.Sample]: """Runs YCSB until client side latency is within the threshold. Args: vms: The client VMs that will be used to push the load. ...
Runs YCSB until client side latency is within the threshold. Args: vms: The client VMs that will be used to push the load. workload: List of workloads to run. run_kwargs: A mapping of additional YCSB run args to pass to the test. Returns: A list of samples from the YCSB test within the...
_RunLatencyThresholdMode
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _RunLatencyThresholdModeSingleWorkload() -> list[sample.Sample]: """Runs the latency threshold test for a single workload.""" max_throughput_samples = _ExecuteWorkload( target_qps=0, duration_mins=_LATENCY_THRESHOLD_WARMUP_MINS.value ) for s in max_throughput_samples: s.met...
Runs the latency threshold test for a single workload.
_RunLatencyThresholdModeSingleWorkload
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def LoadAndRun(self, vms, workloads=None, load_kwargs=None, run_kwargs=None): """Load data using YCSB, then run each workload/client count combination. Loads data using the workload defined by 'workloads', then executes YCSB for each workload file in 'workloads', for each client count defined in FLAGS....
Load data using YCSB, then run each workload/client count combination. Loads data using the workload defined by 'workloads', then executes YCSB for each workload file in 'workloads', for each client count defined in FLAGS.ycsb_threads_per_client. Generally database benchmarks using YCSB should only ne...
LoadAndRun
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb.py
Apache-2.0
def _IsStatusLatencyStatistic(stat_name: str) -> bool: """Returns whether a name is a latency statistic (i.e. "99.9").""" return ( stat_name.replace('.', '', 1).isdigit() or stat_name in _STATUS_LATENCIES )
Returns whether a name is a latency statistic (i.e. "99.9").
_IsStatusLatencyStatistic
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def FromSummaryLines( cls, lines: Iterable[str], operation: str, data_type: str ) -> '_OpResult': """Returns an _OpResult parsed from YCSB summary lines. Example format: [UPDATE], Operations, 2468054 [UPDATE], AverageLatency(us), 2218.8513395574005 [UPDATE], MinLatency(us), 554 ...
Returns an _OpResult parsed from YCSB summary lines. Example format: [UPDATE], Operations, 2468054 [UPDATE], AverageLatency(us), 2218.8513395574005 [UPDATE], MinLatency(us), 554 [UPDATE], MaxLatency(us), 352634 [UPDATE], 95thPercentileLatency(ms), 4 [UPDATE], 99thPercentileLaten...
FromSummaryLines
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def FromStatusLine(cls, match: re.Match[str]) -> '_OpResult': """Returns an _OpResult from a _STATUS_GROUPS_PATTERN match. Example format: [READ: Count=33, Max=11487, Min=2658, Avg=4987.36, 90=8271, 99=11487, 99.9=11487, 99.99=11487] Args: match: Match object that matches _STATUS_GROUPS_PATT...
Returns an _OpResult from a _STATUS_GROUPS_PATTERN match. Example format: [READ: Count=33, Max=11487, Min=2658, Avg=4987.36, 90=8271, 99=11487, 99.9=11487, 99.99=11487] Args: match: Match object that matches _STATUS_GROUPS_PATTERN. Returns: An _OpResult object with group and statistic...
FromStatusLine
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def SplitStatusTimeSeriesForSamples( self, ) -> dict[str, dict[str, list[tuple[int, float]]]]: """Yields individual time series by operation type (i.e. read/update).""" time_series_by_op_and_stat = collections.defaultdict( lambda: collections.defaultdict(list) ) status_results = sorted(s...
Yields individual time series by operation type (i.e. read/update).
SplitStatusTimeSeriesForSamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def WriteStatusTimeSeriesToFile(self) -> None: """Writes time series for each operation to separate file in tempdir.""" stats_to_write = ['time'] + sorted(self._GetStatsToWrite()) written_headers = [] for timestamp, status_result in sorted(self.status_time_series.items()): for op_result in status_...
Writes time series for each operation to separate file in tempdir.
WriteStatusTimeSeriesToFile
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def _ParseStatusLine(line: str) -> Iterator[_OpResult]: """Returns a list of _OpResults from granular YCSB status output.""" matches = re.finditer(_STATUS_GROUPS_PATTERN, line) return (_OpResult.FromStatusLine(match) for match in matches)
Returns a list of _OpResults from granular YCSB status output.
_ParseStatusLine
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def _ValidateErrorRate(result: YcsbResult, threshold: float) -> None: """Raises an error if results contains entries with too high error rate. Computes the error rate for each operation, example output looks like: [INSERT], Operations, 90 [INSERT], AverageLatency(us), 74.92 [INSERT], MinLatency(us), 5...
Raises an error if results contains entries with too high error rate. Computes the error rate for each operation, example output looks like: [INSERT], Operations, 90 [INSERT], AverageLatency(us), 74.92 [INSERT], MinLatency(us), 5 [INSERT], MaxLatency(us), 98495 [INSERT], 95thPercentileLatency(us...
_ValidateErrorRate
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def ParseResults( ycsb_result_string: str, data_type: str = 'histogram', error_rate_threshold: float = 1.0, timestamp_offset_sec: int = 0, epoch_start_time: int = 0, ) -> 'YcsbResult': """Parse YCSB results. Example input for histogram datatype: YCSB Client 0.1 Command line: -db com.ya...
Parse YCSB results. Example input for histogram datatype: YCSB Client 0.1 Command line: -db com.yahoo.ycsb.db.HBaseClient -P /tmp/pkb/workloada [OVERALL], RunTime(ms), 1800413.0 [OVERALL], Throughput(ops/sec), 2740.503428935472 [UPDATE], Operations, 2468054 [UPDATE], AverageLatency(us), 2218...
ParseResults
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def ParseHdrLogFile(logfile: str) -> list[_HdrHistogramTuple]: """Parse a hdrhistogram log file into a list of (percentile, latency, count). Example decrypted hdrhistogram logfile (value measures latency in microsec): #[StartTime: 1523565997 (seconds since epoch), Thu Apr 12 20:46:37 UTC 2018] Value ...
Parse a hdrhistogram log file into a list of (percentile, latency, count). Example decrypted hdrhistogram logfile (value measures latency in microsec): #[StartTime: 1523565997 (seconds since epoch), Thu Apr 12 20:46:37 UTC 2018] Value Percentile TotalCount 1/(1-Percentile) 314.000 0.000000000000 ...
ParseHdrLogFile
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def ParseHdrLogs( hdrlogs: Mapping[str, str], ) -> dict[str, list[_HdrHistogramTuple]]: """Parse a dict of group to hdr logs into a dict of group to histogram tuples. Args: hdrlogs: Dict of group (read or update) to hdr logs for that group. Returns: Dict of group to histogram tuples of reportable pe...
Parse a dict of group to hdr logs into a dict of group to histogram tuples. Args: hdrlogs: Dict of group (read or update) to hdr logs for that group. Returns: Dict of group to histogram tuples of reportable percentile values.
ParseHdrLogs
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def _WeightedQuantile(x, weights, p): """Weighted quantile measurement for an ordered list. This method interpolates to the higher value when the quantile is not a direct member of the list. This works well for YCSB, since latencies are floored. Args: x: List of values. weights: List of numeric weight...
Weighted quantile measurement for an ordered list. This method interpolates to the higher value when the quantile is not a direct member of the list. This works well for YCSB, since latencies are floored. Args: x: List of values. weights: List of numeric weights. p: float. Desired quantile in the in...
_WeightedQuantile
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def _PercentilesFromHistogram(ycsb_histogram, percentiles=_DEFAULT_PERCENTILES): """Calculate percentiles for from a YCSB histogram. Args: ycsb_histogram: List of (time_ms, frequency) tuples. percentiles: iterable of floats, in the interval [0, 100]. Returns: dict, mapping from percentile to value. ...
Calculate percentiles for from a YCSB histogram. Args: ycsb_histogram: List of (time_ms, frequency) tuples. percentiles: iterable of floats, in the interval [0, 100]. Returns: dict, mapping from percentile to value. Raises: ValueError: If one or more percentiles are outside [0, 100].
_PercentilesFromHistogram
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def CombineResults( result_list: Iterable[YcsbResult], measurement_type: str, combined_hdr: Mapping[str, list[_HdrHistogramTuple]], ): """Combine results from multiple YCSB clients. Reduces a list of YCSB results (the output of ParseResults) into a single result. Histogram bin counts, operation count...
Combine results from multiple YCSB clients. Reduces a list of YCSB results (the output of ParseResults) into a single result. Histogram bin counts, operation counts, and throughput are summed; RunTime is replaced by the maximum runtime of any result. Args: result_list: Iterable of ParseResults outputs. ...
CombineResults
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def DropUnaggregated(result: YcsbResult) -> None: """Remove statistics which 'operators' specify should not be combined.""" drop_keys = {k for k, v in AGGREGATE_OPERATORS.items() if v is None} for group in result.groups.values(): for k in drop_keys: group.statistics.pop(k, None)
Remove statistics which 'operators' specify should not be combined.
DropUnaggregated
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def _CombineLatencyTimeSeries( combined_series: list[tuple[int, float]], individual_series: list[tuple[int, float]], ) -> list[tuple[int, float]]: """Combines two timeseries of average latencies. Args: combined_series: A list representing the timeseries with which the individual ser...
Combines two timeseries of average latencies. Args: combined_series: A list representing the timeseries with which the individual series is being merged. individual_series: A list representing the timeseries being merged with the combined series. Returns: A list representing ...
_CombineLatencyTimeSeries
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def _CombineStatistics(result1: _OpResult, result2: _OpResult) -> _OpResult: """Combines reported statistics. If no combining operator is defined, the statistic is skipped. Otherwise, the aggregated value is either: * The value in 'indiv', if the statistic is not present in 'result' or * AGGREGATE_...
Combines reported statistics. If no combining operator is defined, the statistic is skipped. Otherwise, the aggregated value is either: * The value in 'indiv', if the statistic is not present in 'result' or * AGGREGATE_OPERATORS[statistic](result_value, indiv_value) Args: result1: First _OpR...
_CombineStatistics
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def _CombineOpResultLists( list1: Iterable[_OpResult], list2: Iterable[_OpResult] ) -> list[_OpResult]: """Combines two lists of _OpResult into a single list.""" list1_by_operation = {result.group: result for result in list1} list2_by_operation = {result.group: result for result in list2} result...
Combines two lists of _OpResult into a single list.
_CombineOpResultLists
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def _CombineStatusTimeSeries( series1: Mapping[int, _StatusResult], series2: Mapping[int, _StatusResult] ) -> dict[int, _StatusResult]: """Returns a combined dict of [timestamp, result] from the two series.""" timestamps1 = set(series1) timestamps2 = set(series2) all_timestamps = timestamps1 | t...
Returns a combined dict of [timestamp, result] from the two series.
_CombineStatusTimeSeries
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def CombineHdrHistogramLogFiles( hdr_install_dir: str, hdr_files_dir: str, vms: Iterable[virtual_machine.VirtualMachine], ) -> dict[str, str]: """Combine multiple hdr histograms by group type. Combine multiple hdr histograms in hdr log files format into 1 human readable hdr histogram log file. This...
Combine multiple hdr histograms by group type. Combine multiple hdr histograms in hdr log files format into 1 human readable hdr histogram log file. This is done by 1) copying hdrhistogram log files to a single file on a worker vm; 2) aggregating file containing multiple %-tile histogram into a single %...
CombineHdrHistogramLogFiles
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def ExtractStats( samples: list[sample.Sample], percentile: str ) -> ThroughputLatencyResult: """Returns the throughput and latency recorded in the samples.""" throughput, read_latency, update_latency = 0, 0, 0 for result in samples: if result.metric == 'overall Throughput': throughput = result.valu...
Returns the throughput and latency recorded in the samples.
ExtractStats
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/ycsb_stats.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_packages/ycsb_stats.py
Apache-2.0
def LoadProviderFlags(providers): """Imports just the flags module for each provider. This allows PKB to load flag definitions from each provider to include in the help text without actually loading any other provider-specific modules. Args: providers: series of strings. Each element is a value from VALID...
Imports just the flags module for each provider. This allows PKB to load flag definitions from each provider to include in the help text without actually loading any other provider-specific modules. Args: providers: series of strings. Each element is a value from VALID_CLOUDS indicating a cloud provid...
LoadProviderFlags
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/providers/__init__.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/providers/__init__.py
Apache-2.0
def LoadProvider(provider_name, ignore_package_requirements=True): """Loads the all modules in the 'provider_name' package. This function first checks the specified provider's Python package requirements file, if one exists, and verifies that all requirements are met. Next, it loads all modules in the specifie...
Loads the all modules in the 'provider_name' package. This function first checks the specified provider's Python package requirements file, if one exists, and verifies that all requirements are met. Next, it loads all modules in the specified provider's package. By loading these modules, relevant classes (e.g....
LoadProvider
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/providers/__init__.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/providers/__init__.py
Apache-2.0