

def RunTestOnLoader(vm, loader_index, operations_per_vm, data_node_ips, command, user_operations, population_per_vm, population_dist, population_params):
    'Run Cassandra-stress test on loader node.\n\n  Args:\n    vm: The target vm.\n    loader_index: integer. The index of target vm in loader vms.\n    operations_per_vm: integer. The number of operations each loader vm\n        requests.\n    data_node_ips: list. List of IP addresses for all data nodes.\n    command: string. The cassandra-stress command to use.\n    user_operations: string. The operations to use with user mode.\n    population_per_vm: integer. Population per loader vm.\n    population_dist: string. The population distribution.\n    population_params: string. Representing additional population parameters.\n  '
    if (operations_per_vm == USER_COMMAND):
        command += ' profile={profile} ops\\({ops}\\)'.format(profile=TEMP_PROFILE_PATH, ops=user_operations)
        schema_option = ''
    else:
        if (command == MIXED_COMMAND):
            command += ' ratio\\({ratio}\\)'.format(ratio=FLAGS.cassandra_stress_mixed_ratio)
        schema_option = '-schema replication\\(factor={replication_factor}\\)'.format(replication_factor=FLAGS.cassandra_stress_replication_factor)
    population_range = ('%s..%s' % (((loader_index * population_per_vm) + 1), ((loader_index + 1) * population_per_vm)))
    if population_params:
        population_params = ('%s,%s' % (population_range, population_params))
    else:
        population_params = population_range
    if population_dist:
        population_dist = ('-pop dist=%s\\(%s\\)' % (population_dist, population_params))
    else:
        population_dist = ('-pop seq=%s' % population_params)
    vm.RobustRemoteCommand('{cassandra} {command} cl={consistency_level} n={num_keys} -node {nodes} {schema} {population_dist} -log file={result_file} -rate threads={threads} -errors retries={retries}'.format(cassandra=cassandra.GetCassandraStressPath(vm), command=command, consistency_level=FLAGS.cassandra_stress_consistency_level, num_keys=operations_per_vm, nodes=','.join(data_node_ips), schema=schema_option, population_dist=population_dist, result_file=_ResultFilePath(vm), retries=FLAGS.cassandra_stress_retries, threads=FLAGS.num_cassandra_stress_threads))

dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/linux_benchmarks/cassandra_stress_benchmark.py RunTestOnLoader/VarMisuse@30/278 `command`->`operations_per_vm`