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 Cleanup(benchmark_spec): """Cleanup netperf on the target vm (by uninstalling). Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vms = benchmark_spec.vms for vm in vms[1:]: vm.RemoteCommand('sudo killall netserver') vms[0].Rem...
Cleanup netperf 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/bidirectional_network_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bidirectional_network_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install and set up tensorflow io on the target VM.""" vm = benchmark_spec.vms[0] 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_S...
Install and set up tensorflow io on the target VM.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/bigquery_tf_connector_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bigquery_tf_connector_benchmark.py
Apache-2.0
def _RunBenchmark(vm, streams=1, batch_size=2048, data_format='AVRO'): """Run a benchmark python script on a VM for given arguments. Args: vm: GCE VM instance where to run the benchmark. streams: Number of BigQuery streams to use. batch_size: batch size to use. data_format: serialization data forma...
Run a benchmark python script on a VM for given arguments. Args: vm: GCE VM instance where to run the benchmark. streams: Number of BigQuery streams to use. batch_size: batch size to use. data_format: serialization data format to use (AVRO or ARROW). Returns: Benchmark result.
_RunBenchmark
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/bigquery_tf_connector_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bigquery_tf_connector_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run a benchmark python script on a VM and returns results.""" vm = benchmark_spec.vms[0] results = _RunBenchmark( vm, streams=FLAGS.requested_streams, batch_size=FLAGS.batch_size, data_format=FLAGS.format, ) return results
Run a benchmark python script on a VM and returns results.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/bigquery_tf_connector_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bigquery_tf_connector_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Measure the boot time for all VMs. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects with individual machine boot times. """ vm = benchmark_spec.vms[0] if 'all' not ...
Measure the boot time for all VMs. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects with individual machine boot times.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/blazemark_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/blazemark_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Prepare the virtual machine to run FIO. This includes installing fio, bc. and libaio1 and insuring that the attached disk is large enough to support the fio benchmark. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run t...
Prepare the virtual machine to run FIO. This includes installing fio, bc. and libaio1 and insuring that the attached disk is large enough to support the fio benchmark. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
Apache-2.0
def RunSimulatedLogging(vm): """Spawn fio to simulate logging and gather the results. Args: vm: The vm that synthetic_storage_workloads_benchmark will be run upon. Returns: A list of sample.Sample objects """ test_size = vm.total_memory_kb cmd = ( '--filesize=10g ' '--directory=%s ' ...
Spawn fio to simulate logging and gather the results. Args: vm: The vm that synthetic_storage_workloads_benchmark will be run upon. Returns: A list of sample.Sample objects
RunSimulatedLogging
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
Apache-2.0
def RunSimulatedDatabase(vm): """Spawn fio to simulate database and gather the results. Args: vm: The vm that synthetic_storage_workloads_benchmark will be run upon. Returns: A list of sample.Sample objects """ test_size = min(vm.total_memory_kb / 10, 1000000) iodepth_list = FLAGS.iodepth_list or ...
Spawn fio to simulate database and gather the results. Args: vm: The vm that synthetic_storage_workloads_benchmark will be run upon. Returns: A list of sample.Sample objects
RunSimulatedDatabase
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
Apache-2.0
def RunSimulatedStreaming(vm): """Spawn fio to simulate streaming and gather the results. Args: vm: The vm that synthetic_storage_workloads_benchmark will be run upon. Returns: A list of sample.Sample objects """ test_size = min(vm.total_memory_kb / 10, 1000000) iodepth_list = FLAGS.iodepth_list o...
Spawn fio to simulate streaming and gather the results. Args: vm: The vm that synthetic_storage_workloads_benchmark will be run upon. Returns: A list of sample.Sample objects
RunSimulatedStreaming
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Spawn fio and gather the results. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ logging.info('Simulating %s scenario.', FLAGS.workload_mode) vms = benchmark...
Spawn fio and gather the results. 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/block_storage_workloads_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec): """Uninstall packages required for fio and remove benchmark files. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vms = benchmark_spec.vms vm = vms[0] logging.info('FIO Cleanup up on %s', vm) vm.Remove...
Uninstall packages required for fio and remove benchmark files. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/block_storage_workloads_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install Bonnie++ on the target vm. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vms = benchmark_spec.vms vm = vms[0] logging.info('Bonnie++ prepare on %s', vm) vm.InstallPackages('bonnie++')
Install Bonnie++ on the target vm. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
Apache-2.0
def IsValueValid(value): """Validate the value. An invalid value is either an empty string or a string of multiple '+'. Args: value: string. The value in raw result. Returns: A boolean indicates if the value is valid or not. """ if value == '' or '+' in value: return False return True
Validate the value. An invalid value is either an empty string or a string of multiple '+'. Args: value: string. The value in raw result. Returns: A boolean indicates if the value is valid or not.
IsValueValid
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
Apache-2.0
def ParseLatencyResult(result): """Parse latency result into value and unit. Args: result: string. Latency value in string format, contains value and unit. eg. 200ms Returns: A tuple of value (float) and unit (string). """ match = regex_util.ExtractAllMatches(LATENCY_REGEX, result)[0] return...
Parse latency result into value and unit. Args: result: string. Latency value in string format, contains value and unit. eg. 200ms Returns: A tuple of value (float) and unit (string).
ParseLatencyResult
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
Apache-2.0
def UpdateMetadata(metadata, key, value): """Check if the value is valid, update metadata with the key, value pair. Args: metadata: dict. A dictionary of sample metadata. key: string. Key that will be added into metadata dictionary. value: Value that of the key. """ if IsValueValid(value): meta...
Check if the value is valid, update metadata with the key, value pair. Args: metadata: dict. A dictionary of sample metadata. key: string. Key that will be added into metadata dictionary. value: Value that of the key.
UpdateMetadata
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
Apache-2.0
def CreateSamples( results, start_index, end_index, metadata, field_index_mapping ): """Create samples with data in results from start_index to end_index. Args: results: A list of string representing bonnie++ results. start_index: integer. The start index in results list of the samples. end_index: ...
Create samples with data in results from start_index to end_index. Args: results: A list of string representing bonnie++ results. start_index: integer. The start index in results list of the samples. end_index: integer. The end index in results list of the samples. metadata: dict. A dictionary of met...
CreateSamples
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
Apache-2.0
def ParseCSVResults(results): """Parse csv format bonnie++ results. Sample Results: 1.96,1.96,perfkit-7b22f510-0,1,1421800799,7423M,,,,72853,15,47358,5,,, 156821,7,537.7,10,100,,,,,49223,58,+++++,+++,54405,53,2898,97,+++++,+++, 59089,60,,512ms,670ms,,44660us,200ms,3747us,1759us,1643us,33518us,192us, ...
Parse csv format bonnie++ results. Sample Results: 1.96,1.96,perfkit-7b22f510-0,1,1421800799,7423M,,,,72853,15,47358,5,,, 156821,7,537.7,10,100,,,,,49223,58,+++++,+++,54405,53,2898,97,+++++,+++, 59089,60,,512ms,670ms,,44660us,200ms,3747us,1759us,1643us,33518us,192us, 839us Args: results: strin...
ParseCSVResults
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run Bonnie++ on the target vm. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of samples in the form of 3 or 4 tuples. The tuples contain the sample metric (string), value (float), and ...
Run Bonnie++ on the target vm. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of samples in the form of 3 or 4 tuples. The tuples contain the sample metric (string), value (float), and unit (string). If a 4t...
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
Apache-2.0
def GetConfig(user_config): """Customize the config for the benchmark based on flags.""" cloud = FLAGS.cloud config = configs.LoadConfig(BENCHMARK_CONFIG, user_config, BENCHMARK_NAME) if FLAGS.client_vm_machine_type: vm_spec = config['vm_groups'][CLIENT_GROUP]['vm_spec'] for cloud_value in vm_spec: ...
Customize the config for the benchmark based on flags.
GetConfig
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def CheckPrerequisites(benchmark_config): """Verifies that the required resources are present. Raises: perfkitbenchmarker.data.ResourceNotFound: On missing resource. """ if not CASSANDRA_SERVER_ZONES.value: raise errors.Setup.InvalidFlagConfigurationError( 'Specify zones for cassandra servers i...
Verifies that the required resources are present. Raises: perfkitbenchmarker.data.ResourceNotFound: On missing resource.
CheckPrerequisites
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def CheckMetadata(metadata): """Verify that metadata is valid. Args: metadata: dict. Contains metadata for this benchmark. """ if metadata['command'] in PRELOAD_REQUIRED: if metadata['population_size'] > metadata['num_preload_keys']: raise errors.Benchmarks.PrepareException( 'For %s mod...
Verify that metadata is valid. Args: metadata: dict. Contains metadata for this benchmark.
CheckMetadata
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def GenerateMetadataFromFlags(benchmark_spec, cassandra_vms, client_vms): """Generate metadata from command-line flags. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. cassandra_vms: cassandra server vms. client_vms: cassandra client vms...
Generate metadata from command-line flags. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. cassandra_vms: cassandra server vms. client_vms: cassandra client vms. Returns: dict. Contains metadata for this benchmark.
GenerateMetadataFromFlags
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def PreloadCassandraServer(cassandra_vms, client_vms, metadata): """Preload cassandra cluster if necessary. Args: cassandra_vms: cassandra server vms. client_vms: client vms that run cassandra-stress. metadata: dict. Contains metadata for this benchmark. """ if ( FLAGS.cassandra_stress_comman...
Preload cassandra cluster if necessary. Args: cassandra_vms: cassandra server vms. client_vms: client vms that run cassandra-stress. metadata: dict. Contains metadata for this benchmark.
PreloadCassandraServer
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install Cassandra and Java on target vms. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vm_dict = benchmark_spec.vm_groups cassandra_vms, client_vms = ParseVmGroups(vm_dict) logging.info('VM dictiona...
Install Cassandra and Java on 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/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def RunTestOnLoader( vm, loader_index, operations_per_vm, data_node_ips, command, user_operations, population_per_vm, population_dist, population_params, thread_count, is_preload, ): """Run Cassandra-stress test on loader node. Args: vm: The target vm. loader_ind...
Run Cassandra-stress test on loader node. Args: vm: The target vm. loader_index: integer. The index of target vm in loader vms. operations_per_vm: integer. The number of operations each loader vm requests. data_node_ips: list. List of IP addresses for all data nodes. command: string. The ca...
RunTestOnLoader
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def RunCassandraStressTest( cassandra_vms, loader_vms, num_operations, command, thread_count, profile_operations='insert=1', population_size=None, population_dist=None, population_params=None, is_preload=False, ): """Start all loader nodes as Cassandra clients and run stress te...
Start all loader nodes as Cassandra clients and run stress test. Args: cassandra_vms: list. A list of vm objects. Cassandra servers. load_vms: list. A list of vm objects. Cassandra clients. num_keys: integer. The number of operations cassandra-stress clients should issue. command: string. The c...
RunCassandraStressTest
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def ParseAverageCpuUtilization(output) -> float: """Parses the output of the sar command.""" average_cpu_utilization = re.findall( r'^Average.*$', output, flags=re.MULTILINE ) if not average_cpu_utilization: logging.error('No average cpu utilization found in sar output.') return 0 per_process_cp...
Parses the output of the sar command.
ParseAverageCpuUtilization
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def CalculateNumberOfSarRequestsFromDuration(duration, freq): """Calculates the number of sar requests to be sent from the duration of the test.""" if duration is None: # If duration is not set, we don't need to send sar requests. return 0 duration = duration.replace('m', 'min') # In units, m is meter ...
Calculates the number of sar requests to be sent from the duration of the test.
CalculateNumberOfSarRequestsFromDuration
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def ParseResp(resp) -> dict[str, Union[float, int]]: """Parses response from Cassandra stress test. Args: resp: metric data to parse Returns: dict of all the metrics and their values """ all_rows = resp.split('\n') metric_values = {} for row in all_rows: if row.strip() == 'Results:' or not r...
Parses response from Cassandra stress test. Args: resp: metric data to parse Returns: dict of all the metrics and their values
ParseResp
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def _ParseResultRow(row: str) -> tuple[str, float] | None: """Parses a single row of the result file.""" try: metric_name = regex_util.ExtractGroup('(.*) :', row, 1).lower().strip() except regex_util.NoMatchError: logging.error('Metric name not found in row: %s', row) return None if metric_name not ...
Parses a single row of the result file.
_ParseResultRow
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def CollectResultFile(vm, results): """Collect result file on vm. Args: vm: The target vm. results: A dictionary of lists. Each list contains results of a field defined in RESULTS_METRICS collected from each loader machines. """ result_path = _ResultFilePath(vm) vm.PullFile(vm_util.GetTempDir()...
Collect result file on vm. Args: vm: The target vm. results: A dictionary of lists. Each list contains results of a field defined in RESULTS_METRICS collected from each loader machines.
CollectResultFile
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def CollectResults(loader_vms, metadata): """Collect and parse test results. Args: loader_vms: client vms. metadata: dict. Contains metadata for this benchmark. Returns: A list of sample.Sample objects. """ logging.info('Gathering results.') raw_results = collections.defaultdict(list) args =...
Collect and parse test results. Args: loader_vms: client vms. metadata: dict. Contains metadata for this benchmark. Returns: A list of sample.Sample objects.
CollectResults
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run Cassandra on target vms. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ cassandra_vms, client_vms = ParseVmGroups(benchmark_spec.vm_groups) metadata = Ge...
Run Cassandra on target vms. 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/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def RunTestNTimes(client_vms, cassandra_vms, metadata): """Run the cassandra stress test max_allowed_runs times. Args: client_vms: client vms. cassandra_vms: cassandra server vms. metadata: dict. Contains metadata for this benchmark. Returns: A list of sample.Sample objects. Running cassandra...
Run the cassandra stress test max_allowed_runs times. Args: client_vms: client vms. cassandra_vms: cassandra server vms. metadata: dict. Contains metadata for this benchmark. Returns: A list of sample.Sample objects. Running cassandra stress test with different thread counts. - We increase th...
RunTestNTimes
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def WaitForCompactionTasks(cassandra_vms): """Waits for cassandra's pending compaction tasks to be completed.""" pending_compaction_tasks = cassandra.GetPendingTaskCountFromCompactionStats( cassandra_vms ) max_pending_compaction_tasks = max(pending_compaction_tasks) logging.info( 'Remaining compac...
Waits for cassandra's pending compaction tasks to be completed.
WaitForCompactionTasks
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def GetCpuUtilization(cassandra_vms): """Get cpu utilization during the test from sar output. Args: cassandra_vms: cassandra server vms. Returns: A list of cpu utilization for each cassandra node. """ cpu_utilization = [] if ( CalculateNumberOfSarRequestsFromDuration( CASSANDRA_STR...
Get cpu utilization during the test from sar output. Args: cassandra_vms: cassandra server vms. Returns: A list of cpu utilization for each cassandra node.
GetCpuUtilization
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def ParseUptimeOutput(uptime_output) -> float: """Parses the output of the uptime command. Args: uptime_output: The output of the uptime command. Returns: The load average of the last 5 minutes. Sample uptime command output: 20:11:37 up 172 days, 22 min, 4 users, load average: 0.23, 0.54, 0.31 lo...
Parses the output of the uptime command. Args: uptime_output: The output of the uptime command. Returns: The load average of the last 5 minutes. Sample uptime command output: 20:11:37 up 172 days, 22 min, 4 users, load average: 0.23, 0.54, 0.31 load average displays the load average of the last 1 m...
ParseUptimeOutput
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec): """Cleanup function. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vm_dict = benchmark_spec.vm_groups cassandra_vms = vm_dict[CASSANDRA_GROUP] background_tasks.RunThreaded(cassandra.Stop, cassandra_vms)...
Cleanup function. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py
Apache-2.0
def _CreateYCSBTable( vm, keyspace=KEYSPACE_NAME, column_family=COLUMN_FAMILY, replication_factor=REPLICATION_FACTOR, ): """Creates a Cassandra table for use with YCSB.""" template_path = data.ResourcePath(CREATE_TABLE_SCRIPT) remote_path = os.path.join( cassandra.CASSANDRA_DIR, os.pat...
Creates a Cassandra table for use with YCSB.
_CreateYCSBTable
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_ycsb_benchmark.py
Apache-2.0
def _GetVMsByRole(benchmark_spec): """Gets a dictionary mapping role to a list of VMs.""" cassandra_vms = benchmark_spec.vm_groups['workers'] if FLAGS.ycsb_client_vms: clients = benchmark_spec.vm_groups['clients'] else: clients = cassandra_vms return { 'vms': benchmark_spec.vms, 'cassandra...
Gets a dictionary mapping role to a list of VMs.
_GetVMsByRole
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_ycsb_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Prepare the virtual machines to run YCSB against Cassandra. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vms = benchmark_spec.vms by_role = _GetVMsByRole(benchmark_spec) loaders = by_role['clients'...
Prepare the virtual machines to run YCSB against Cassandra. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_ycsb_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Spawn YCSB and gather the results. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample instances. """ loaders = _GetVMsByRole(benchmark_spec)['clients'] cassandra_vms = _GetVM...
Spawn YCSB and gather the results. 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/cassandra_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_ycsb_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec): """Cleanup. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ cassandra_vms = _GetVMsByRole(benchmark_spec)['cassandra_vms'] background_tasks.RunThreaded(cassandra.Stop, cassandra_vms) background_tasks.RunT...
Cleanup. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cassandra_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cassandra_ycsb_benchmark.py
Apache-2.0
def _BuildAndCleanTarget(vm, requested_target, metadata): """Run a full build and clean of the provided git target. Args: vm: virtual_machine, where to run the build. requested_target: string, a valid ninja build target. Probably 'chrome' or 'base_unittests'. metadata: dict, metadata to include i...
Run a full build and clean of the provided git target. Args: vm: virtual_machine, where to run the build. requested_target: string, a valid ninja build target. Probably 'chrome' or 'base_unittests'. metadata: dict, metadata to include in the resulting Samples. Returns: A list of sample.Sampl...
_BuildAndCleanTarget
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/chromium_compile_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/chromium_compile_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run a timed compile of the Chromium source. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample instances. """ vm = benchmark_spec.vms[0] returnme = [] local_working_direct...
Run a timed compile of the Chromium source. 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/chromium_compile_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/chromium_compile_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec): """Cleanup the VM to its original state. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vm = benchmark_spec.vms[0] vm.RemoteCommand( 'rm -rf {}'.format( os.path.join(vm.GetScratchDir(), WOR...
Cleanup the VM to its original state. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/chromium_compile_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/chromium_compile_benchmark.py
Apache-2.0
def _PrepareDevicePath(vm, link): """Find device path and grant full permission. Args: vm: VirtualMachine object. link: string. Represents device path. Returns: String represents the actual path to the device. """ path = vm.RemoteCommand('readlink -f %s' % link)[0][:-1] vm.RemoteCommand('sudo ...
Find device path and grant full permission. Args: vm: VirtualMachine object. link: string. Represents device path. Returns: String represents the actual path to the device.
_PrepareDevicePath
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/ch_block_storage_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/ch_block_storage_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Runs cloudharmony block storage and reports the results.""" vm = benchmark_spec.vms[0] target = ' '.join([ '--target=%s' % _PrepareDevicePath(vm, dev.GetDevicePath()) for dev in vm.scratch_disks ]) tests = ' '.join(['--test=%s' % test for test in FLAGS.ch_block_tests]) ...
Runs cloudharmony block storage and reports the results.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/ch_block_storage_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/ch_block_storage_benchmark.py
Apache-2.0
def _StartServer(vm): """Starts the server. Args: vm: the server virtual machine. """ for port in list(range(_PORT, _PORT + _IPERF_CONCURRENCY.value)): vm.RemoteCommand(f'nohup iperf3 --server -p {port} &> /dev/null & echo $!')
Starts the server. Args: vm: the server virtual machine.
_StartServer
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_iperf_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_iperf_benchmark.py
Apache-2.0
def _PrepareVm(vm): """Prepares the server and the client. Args: vm: the server or client virtual machine. """ vm.AuthenticateVm() vm.Install('iperf3') # Dependencies for cloudharmony wrapper vm.Install('php') vm.InstallPackages('gnuplot wkhtmltopdf xvfb zip') vm.RemoteCommand(f'git clone --recur...
Prepares the server and the client. Args: vm: the server or client virtual machine.
_PrepareVm
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_iperf_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_iperf_benchmark.py
Apache-2.0
def _Run(benchmark_spec): """Runs cloudharmony iperf from cloudharmony harness.""" vm_groups = benchmark_spec.vm_groups client = vm_groups['client'][0] servers = vm_groups['server'] ports = list(range(_PORT, _PORT + _IPERF_CONCURRENCY.value)) ports_str = ':'.join([str(port) for port in ports]) server_port...
Runs cloudharmony iperf from cloudharmony harness.
_Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_iperf_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_iperf_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Runs cloudharmony iperf and reports the results.""" cloud_harmony_metadata = _Run(benchmark_spec) samples = cloud_harmony_util.GetMetadataSamples(cloud_harmony_metadata) # format pkb-style samples for result_row in cloud_harmony_metadata: for metric in _CLOUDHARMONY_IPERF_METR...
Runs cloudharmony iperf and reports the results.
Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_iperf_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_iperf_benchmark.py
Apache-2.0
def _GetMetricUnit(metric_name): """Returns the appropriate units for the given metric.""" metric_type = metric_name.split('_')[0] if metric_type == 'bandwidth': return 'Mbits/sec' if metric_type == 'jitter': return 'ms' if metric_type == 'loss': return '%'
Returns the appropriate units for the given metric.
_GetMetricUnit
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_iperf_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_iperf_benchmark.py
Apache-2.0
def CheckPrerequisites(_): """Verifies that the required resources are present. Raises NotImplementedError. """ # currently only support GCS object storage # TODO(user): add AWS & Azure support for object storage if FLAGS.ch_network_test_service_type == STORAGE and FLAGS.cloud != 'GCP': raise NotImplem...
Verifies that the required resources are present. Raises NotImplementedError.
CheckPrerequisites
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
Apache-2.0
def GetConfig(user_config): """Update client zone and server zone in configuration. Args: user_config: The user configuration. Returns: Updated configuration. """ config = configs.LoadConfig(BENCHMARK_CONFIG, user_config, BENCHMARK_NAME) config['vm_groups']['client']['vm_spec'][FLAGS.cloud][ ...
Update client zone and server zone in configuration. Args: user_config: The user configuration. Returns: Updated configuration.
GetConfig
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
Apache-2.0
def _PrepareServer(vm): """Prepares the web servers. Args: vm: the server virtual machine. """ vm.Install(NGINX) # Required to make uplink test function properly vm.RemoteCommand( r'sudo sed -i "/server_name _;/a error_page 405 =200 \$uri;"' r' /etc/nginx/sites-enabled/default' ) vm.R...
Prepares the web servers. Args: vm: the server virtual machine.
_PrepareServer
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
Apache-2.0
def _PrepareBucket(benchmark_spec): """Prepares the GCS bucket for object storage test. First creates a bucket in the specified bucket region. Then populates the test bucket with contents of https://github.com/cloudharmony/web-probe as well as larger generated test files. The new bucket is saved to later be se...
Prepares the GCS bucket for object storage test. First creates a bucket in the specified bucket region. Then populates the test bucket with contents of https://github.com/cloudharmony/web-probe as well as larger generated test files. The new bucket is saved to later be set as the test endpoint for the object s...
_PrepareBucket
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
Apache-2.0
def ParseOutput(cloud_harmony_metadata): """Parse CSV output from CloudHarmony network benchmark. Args: cloud_harmony_metadata: cloud harmony network metadata. Returns: A list of sample.Sample object. Raises: Benchmarks.RunError: If correct operation is not validated. """ # If one run in iter...
Parse CSV output from CloudHarmony network benchmark. Args: cloud_harmony_metadata: cloud harmony network metadata. Returns: A list of sample.Sample object. Raises: Benchmarks.RunError: If correct operation is not validated.
ParseOutput
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
Apache-2.0
def _AddComputeMetadata(client, server, metadata): """Updates the metadata with network compute metadata.""" compute_metadata = { # test_instance_id, test_region and meta_os_info are informational and # used in conjunction with saving results. 'test_instance_id': server.machine_type, 'test_r...
Updates the metadata with network compute metadata.
_AddComputeMetadata
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
Apache-2.0
def _AddStorageMetadata(vm, metadata): """Updates the metadata with object storage metadata.""" storage_metadata = { 'test_instance_id': '', 'test_region': cloud_harmony_util.GetRegionFromZone(ENDPOINT_ZONE.value), 'meta_instance_id': vm.machine_type, 'meta_region': cloud_harmony_util.GetReg...
Updates the metadata with object storage metadata.
_AddStorageMetadata
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
Apache-2.0
def _Run(benchmark_spec, test): """Runs cloudharmony network and reports the results.""" vm_groups = benchmark_spec.vm_groups metadata = { 'test_service_type': FLAGS.ch_network_test_service_type, 'test': test, 'throughput_size': FLAGS.ch_network_throughput_size, 'throughput_threads': FLAGS...
Runs cloudharmony network and reports the results.
_Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec): """Cleanup any artifacts left by the benchmark.""" if FLAGS.ch_network_test_service_type != STORAGE or not hasattr( benchmark_spec, 'service' ): logging.info( 'Skipping cleanup as not needed or storage prepare method failed.' ) return service = benchmark_sp...
Cleanup any artifacts left by the benchmark.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudharmony_network_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install docker. Pull images. Start the master and slaves. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ master = benchmark_spec.vm_groups['master'][0] slaves = benchmark_spec.vm_groups['slaves'] def...
Install docker. Pull images. Start the master and slaves. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudsuite_data_analytics_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_data_analytics_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run the data analytics benchmark. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ master = benchmark_spec.vm_groups['master'][0] results = [] stdout, _ = m...
Run the data analytics benchmark. 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/cloudsuite_data_analytics_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_data_analytics_benchmark.py
Apache-2.0
def Cleanup(benchmark_spec): """Stop and remove docker containers. Remove images. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ master = benchmark_spec.vm_groups['master'][0] slaves = benchmark_spec.vm_groups['slaves'] def Cleanup...
Stop and remove docker containers. Remove images. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Cleanup
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudsuite_data_analytics_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_data_analytics_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install docker. Pull the required images from DockerHub. Create datasets. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ server_vm = benchmark_spec.vm_groups['server'][0] client_vm = benchmark_spec.vm_g...
Install docker. Pull the required images from DockerHub. Create datasets. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudsuite_data_caching_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_data_caching_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run the data-caching benchmark. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ client_vm = benchmark_spec.vm_groups['client'][0] benchmark_cmd = ( 'su...
Run the data-caching benchmark. 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/cloudsuite_data_caching_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_data_caching_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Prepare docker containers and set the dataset up. Install docker. Pull the required images from DockerHub. Create a table into server-seed and load the dataset. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark....
Prepare docker containers and set the dataset up. Install docker. Pull the required images from DockerHub. Create a table into server-seed and load the dataset. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudsuite_data_serving_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_data_serving_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run the data_serving benchmark. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ server_seed = benchmark_spec.vm_groups['server_seed'][0] servers = benchmark_s...
Run the data_serving benchmark. 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/cloudsuite_data_serving_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_data_serving_benchmark.py
Apache-2.0
def GetConfig(user_config): """Reads the config file and overwrites vm_count with num_vms.""" config = configs.LoadConfig(BENCHMARK_CONFIG, user_config, BENCHMARK_NAME) if FLAGS['num_vms'].present: config['vm_groups']['workers']['vm_count'] = FLAGS.num_vms return config
Reads the config file and overwrites vm_count with num_vms.
GetConfig
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudsuite_graph_analytics_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_graph_analytics_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install docker. Pull the required images from DockerHub, create datasets, and start Spark master and workers. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ master = benchmark_spec.vm_groups['master'...
Install docker. Pull the required images from DockerHub, create datasets, and start Spark master and workers. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudsuite_graph_analytics_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_graph_analytics_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run the graph analytics benchmark. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ master = benchmark_spec.vm_groups['master'][0] results = [] memory_option...
Run the graph analytics benchmark. 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/cloudsuite_graph_analytics_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_graph_analytics_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install docker. Pull images. Create datasets. Start master and workers. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ master = benchmark_spec.vm_groups['master'][0] workers = benchmark_spec.vm_groups['...
Install docker. Pull images. Create datasets. Start master and workers. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudsuite_in_memory_analytics_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_in_memory_analytics_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run the in-memory analytics benchmark. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ master = benchmark_spec.vm_groups['master'][0] results = [] benchmar...
Run the in-memory analytics benchmark. 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/cloudsuite_in_memory_analytics_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_in_memory_analytics_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install docker. Pull images. Create datasets. Start Nginx server. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ server = benchmark_spec.vm_groups['server'][0] client = benchmark_spec.vm_groups['client'...
Install docker. Pull images. Create datasets. Start Nginx server. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudsuite_media_streaming_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_media_streaming_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run the media streaming benchmark. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ server = benchmark_spec.vm_groups['server'][0] client = benchmark_spec.vm_g...
Run the media streaming benchmark. 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/cloudsuite_media_streaming_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_media_streaming_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install docker. Pull the required images from DockerHub. Start Solr index node and client. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ servers = benchmark_spec.vm_groups['servers'][0] clients = be...
Install docker. Pull the required images from DockerHub. Start Solr index node and client. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudsuite_web_search_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_web_search_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run the Web Search benchmark. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ clients = benchmark_spec.vm_groups['clients'][0] servers = benchmark_spec.vm_gro...
Run the Web Search benchmark. 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/cloudsuite_web_search_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_web_search_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Install docker. Pull images. Start nginx, mysql, and memcached. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ frontend = benchmark_spec.vm_groups['frontend'][0] backend = benchmark_spec.vm_groups['back...
Install docker. Pull images. Start nginx, mysql, and memcached. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloudsuite_web_serving_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_web_serving_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run the web serving benchmark. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ frontend = benchmark_spec.vm_groups['frontend'][0] client = benchmark_spec.vm_g...
Run the web serving benchmark. 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/cloudsuite_web_serving_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloudsuite_web_serving_benchmark.py
Apache-2.0
def _GetDefaultProject() -> str: """Returns the default project used for this test.""" cmd = [FLAGS.gcloud_path, 'config', 'list', '--format', 'json'] stdout, _, return_code = vm_util.IssueCommand(cmd) if return_code: raise subprocess.CalledProcessError(return_code, cmd, stdout) config = json.loads(stdou...
Returns the default project used for this test.
_GetDefaultProject
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def _Install(vm: virtual_machine.VirtualMachine, bigtable: _Bigtable) -> None: """Install YCSB and CBT HBase client on 'vm'.""" vm.Install('ycsb') vm.Install('google_cloud_cbt') # we use the CLI to create and delete tables vm.Install('maven') if _ENABLE_TRAFFIC_DIRECTOR.value and _USE_JAVA_VENEER_CLIENT.val...
Install YCSB and CBT HBase client on 'vm'.
_Install
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def _GetCpuUtilizationSample( samples: List[sample.Sample], instance_id: str ) -> List[sample.Sample]: """Gets a list of cpu utilization samples - one per cluster per workload. Note that the utilization only covers the workload run stage. Args: samples: list of sample.Sample. Used to find the timestamp ...
Gets a list of cpu utilization samples - one per cluster per workload. Note that the utilization only covers the workload run stage. Args: samples: list of sample.Sample. Used to find the timestamp information to determine the time windows for the cpu metrics. instance_id: the bigtable instance id. ...
_GetCpuUtilizationSample
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def Prepare(benchmark_spec: bm_spec.BenchmarkSpec) -> None: """Prepare the virtual machines to run cloud bigtable. 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 in...
Prepare the virtual machines to run cloud bigtable. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def _GetYcsbExecutor( vms: list[virtual_machine.VirtualMachine], ) -> ycsb.YCSBExecutor: """Gets the YCSB executor class for loading and running the benchmark.""" ycsb_memory = min(vms[0].total_memory_kb // 1024, 4096) jvm_args = pipes.quote(f' -Xmx{ycsb_memory}m') env = {} if _ENABLE_DIRECT_PATH.value: ...
Gets the YCSB executor class for loading and running the benchmark.
_GetYcsbExecutor
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def _LoadDatabase( executor: ycsb.YCSBExecutor, bigtable: gcp_bigtable.GcpBigtableInstance, vms: list[virtual_machine.VirtualMachine], load_kwargs: dict[str, Any], ) -> list[sample.Sample]: """Loads the database with the specified infrastructure capacity.""" if bigtable.restored or ycsb.SKIP_LOAD_ST...
Loads the database with the specified infrastructure capacity.
_LoadDatabase
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def _CommonArgs(instance: _Bigtable) -> Dict[str, str]: """Generates args for both run/load for YCSB. Args: instance: The instance the test will be run against. Returns: Arguments dict for YCSB. """ kwargs = {'columnfamily': COLUMN_FAMILY} if _USE_JAVA_VENEER_CLIENT.value: # Temporary until o...
Generates args for both run/load for YCSB. Args: instance: The instance the test will be run against. Returns: Arguments dict for YCSB.
_CommonArgs
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def _GenerateRunKwargs(instance: _Bigtable) -> Dict[str, str]: """Generates run arguments for YCSB. Args: instance: The instance the test will be run against. Returns: Run arguments for YCSB. """ run_kwargs = _CommonArgs(instance) if _USE_JAVA_VENEER_CLIENT.value and _USE_UPGRADED_DRIVER.value: ...
Generates run arguments for YCSB. Args: instance: The instance the test will be run against. Returns: Run arguments for YCSB.
_GenerateRunKwargs
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def _GenerateLoadKwargs(instance: _Bigtable) -> Dict[str, str]: """Generates load arguments for YCSB. Args: instance: The instance the test will be run against. Returns: Load arguments for YCSB. """ load_kwargs = _CommonArgs(instance) if _USE_JAVA_VENEER_CLIENT.value and _USE_UPGRADED_DRIVER.val...
Generates load arguments for YCSB. Args: instance: The instance the test will be run against. Returns: Load arguments for YCSB.
_GenerateLoadKwargs
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def _CreateTable(benchmark_spec: bm_spec.BenchmarkSpec): """Creates a table when not using a static (ie user managed) table. If the table is user-managed, this is a no-op. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ instance: _Big...
Creates a table when not using a static (ie user managed) table. If the table is user-managed, this is a no-op. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
_CreateTable
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def _CleanupTable(benchmark_spec: bm_spec.BenchmarkSpec): """Deletes a table under a user managed instance. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vm = benchmark_spec.vms[0] instance: _Bigtable = benchmark_spec.non_relational_...
Deletes a table under a user managed instance. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
_CleanupTable
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Apache-2.0
def RampUpLoad( ycsb_executor: ycsb.YCSBExecutor, vms: list[virtual_machine.VirtualMachine], load_kwargs: dict[str, str] = None, ) -> None: """Loads YCSB by gradually incrementing target QPS. Note that this requires clients to be overprovisioned, as the target QPS for YCSB is generally a "throttling"...
Loads 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 the run t...
RampUpLoad
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_datastore_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_datastore_ycsb_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Prepare the virtual machines to run cloud datastore. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ vms = benchmark_spec.vms # Install required packages and copy credential files background_tasks.Run...
Prepare the virtual machines to run cloud datastore. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_datastore_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_datastore_ycsb_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Prepare the cloud redis instance for memtier tasks. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ benchmark_spec.always_call_cleanup = True memtier_vms = benchmark_spec.vm_groups['clients'] backgrou...
Prepare the cloud redis instance for memtier tasks. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_redis_memtier_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_redis_memtier_benchmark.py
Apache-2.0
def _GetConnections( vms: list[_LinuxVm], redis_instance: _ManagedRedis ) -> list[memtier.MemtierConnection]: """Gets a list of connections mapping client VMs to shards.""" if len(vms) == 1: return [ memtier.MemtierConnection( vms[0], redis_instance.GetMemoryStoreIp(), ...
Gets a list of connections mapping client VMs to shards.
_GetConnections
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_redis_memtier_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_redis_memtier_benchmark.py
Apache-2.0
def _MeasureMemtierDistribution( redis_instance: _ManagedRedis, vms: list[_LinuxVm], ) -> list[sample.Sample]: """Runs and reports stats across a series of memtier runs.""" connections = _GetConnections(vms, redis_instance) return memtier.MeasureLatencyCappedThroughputDistribution( connections, ...
Runs and reports stats across a series of memtier runs.
_MeasureMemtierDistribution
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_redis_memtier_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_redis_memtier_benchmark.py
Apache-2.0
def _Run(vms: list[_LinuxVm], redis_instance: _ManagedRedis): """Runs memtier based on provided flags.""" if memtier.MEMTIER_RUN_MODE.value == memtier.MemtierMode.MEASURE_CPU_LATENCY: return memtier.RunGetLatencyAtCpu(redis_instance, vms) if memtier.MEMTIER_LATENCY_CAPPED_THROUGHPUT.value: if memtier.MEMT...
Runs memtier based on provided flags.
_Run
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_redis_memtier_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_redis_memtier_benchmark.py
Apache-2.0
def Run(benchmark_spec): """Run benchmark and collect samples. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample instances. """ memtier_vms = benchmark_spec.vm_groups['clients'] redis_instance: _Manage...
Run benchmark and collect samples. 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/cloud_redis_memtier_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_redis_memtier_benchmark.py
Apache-2.0
def Prepare(benchmark_spec): """Prepare the cloud redis instance to YCSB tasks. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. """ benchmark_spec.always_call_cleanup = True ycsb_vms = benchmark_spec.vm_groups['clients'] background_task...
Prepare the cloud redis instance to YCSB tasks. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark.
Prepare
python
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_redis_ycsb_benchmark.py
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/cloud_redis_ycsb_benchmark.py
Apache-2.0
def CheckPrerequisites(_): """Validates correct flag usages before running this benchmark.""" for scope in REQUIRED_SCOPES: if scope not in FLAGS.gcloud_scopes: raise ValueError('Scope {} required.'.format(scope)) if ycsb.CPU_OPTIMIZATION.value and ( ycsb.CPU_OPTIMIZATION_MEASUREMENT_MINS.value ...
Validates correct flag usages before running this benchmark.
CheckPrerequisites
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