1.1. yardstick package¶
1.1.1. Subpackages¶
- 1.1.1.1. yardstick.benchmark package
- 1.1.1.1.1. Subpackages
- 1.1.1.1.1.1. yardstick.benchmark.contexts package
- 1.1.1.1.1.1.1. Submodules
- 1.1.1.1.1.1.2. yardstick.benchmark.contexts.base module
- 1.1.1.1.1.1.3. yardstick.benchmark.contexts.dummy module
- 1.1.1.1.1.1.4. yardstick.benchmark.contexts.heat module
- 1.1.1.1.1.1.5. yardstick.benchmark.contexts.model module
- 1.1.1.1.1.1.6. yardstick.benchmark.contexts.node module
- 1.1.1.1.1.1.7. Module contents
- 1.1.1.1.1.2. yardstick.benchmark.runners package
- 1.1.1.1.1.2.1. Submodules
- 1.1.1.1.1.2.2. yardstick.benchmark.runners.arithmetic module
- 1.1.1.1.1.2.3. yardstick.benchmark.runners.base module
- 1.1.1.1.1.2.4. yardstick.benchmark.runners.duration module
- 1.1.1.1.1.2.5. yardstick.benchmark.runners.iteration module
- 1.1.1.1.1.2.6. yardstick.benchmark.runners.sequence module
- 1.1.1.1.1.2.7. Module contents
- 1.1.1.1.1.3. yardstick.benchmark.scenarios package
- 1.1.1.1.1.3.1. Subpackages
- 1.1.1.1.1.3.1.1. yardstick.benchmark.scenarios.availability package
- 1.1.1.1.1.3.1.1.1. Subpackages
- 1.1.1.1.1.3.1.1.1.1. yardstick.benchmark.scenarios.availability.attacker package
- 1.1.1.1.1.3.1.1.1.1.1. Submodules
- 1.1.1.1.1.3.1.1.1.1.2. yardstick.benchmark.scenarios.availability.attacker.attacker_baremetal module
- 1.1.1.1.1.3.1.1.1.1.3. yardstick.benchmark.scenarios.availability.attacker.attacker_process module
- 1.1.1.1.1.3.1.1.1.1.4. yardstick.benchmark.scenarios.availability.attacker.baseattacker module
- 1.1.1.1.1.3.1.1.1.1.5. Module contents
- 1.1.1.1.1.3.1.1.1.2. yardstick.benchmark.scenarios.availability.monitor package
- 1.1.1.1.1.3.1.1.1.2.1. Submodules
- 1.1.1.1.1.3.1.1.1.2.2. yardstick.benchmark.scenarios.availability.monitor.basemonitor module
- 1.1.1.1.1.3.1.1.1.2.3. yardstick.benchmark.scenarios.availability.monitor.monitor_command module
- 1.1.1.1.1.3.1.1.1.2.4. yardstick.benchmark.scenarios.availability.monitor.monitor_process module
- 1.1.1.1.1.3.1.1.1.2.5. Module contents
- 1.1.1.1.1.3.1.1.1.1. yardstick.benchmark.scenarios.availability.attacker package
- 1.1.1.1.1.3.1.1.2. Submodules
- 1.1.1.1.1.3.1.1.3. yardstick.benchmark.scenarios.availability.serviceha module
- 1.1.1.1.1.3.1.1.4. Module contents
- 1.1.1.1.1.3.1.1.1. Subpackages
- 1.1.1.1.1.3.1.2. yardstick.benchmark.scenarios.compute package
- 1.1.1.1.1.3.1.2.1. Submodules
- 1.1.1.1.1.3.1.2.2. yardstick.benchmark.scenarios.compute.cpuload module
- 1.1.1.1.1.3.1.2.3. yardstick.benchmark.scenarios.compute.cyclictest module
- 1.1.1.1.1.3.1.2.4. yardstick.benchmark.scenarios.compute.lmbench module
- 1.1.1.1.1.3.1.2.5. yardstick.benchmark.scenarios.compute.perf module
- 1.1.1.1.1.3.1.2.6. yardstick.benchmark.scenarios.compute.unixbench module
- 1.1.1.1.1.3.1.2.7. Module contents
- 1.1.1.1.1.3.1.3. yardstick.benchmark.scenarios.dummy package
- 1.1.1.1.1.3.1.4. yardstick.benchmark.scenarios.networking package
- 1.1.1.1.1.3.1.4.1. Submodules
- 1.1.1.1.1.3.1.4.2. yardstick.benchmark.scenarios.networking.iperf3 module
- 1.1.1.1.1.3.1.4.3. yardstick.benchmark.scenarios.networking.netperf module
- 1.1.1.1.1.3.1.4.4. yardstick.benchmark.scenarios.networking.ping module
- 1.1.1.1.1.3.1.4.5. yardstick.benchmark.scenarios.networking.ping6 module
- 1.1.1.1.1.3.1.4.6. yardstick.benchmark.scenarios.networking.pktgen module
- 1.1.1.1.1.3.1.4.7. yardstick.benchmark.scenarios.networking.sfc module
- 1.1.1.1.1.3.1.4.8. yardstick.benchmark.scenarios.networking.vtc_instantiation_validation module
- 1.1.1.1.1.3.1.4.9. yardstick.benchmark.scenarios.networking.vtc_instantiation_validation_noisy module
- 1.1.1.1.1.3.1.4.10. yardstick.benchmark.scenarios.networking.vtc_throughput module
- 1.1.1.1.1.3.1.4.11. yardstick.benchmark.scenarios.networking.vtc_throughput_noisy module
- 1.1.1.1.1.3.1.4.12. Module contents
- 1.1.1.1.1.3.1.5. yardstick.benchmark.scenarios.parser package
- 1.1.1.1.1.3.1.6. yardstick.benchmark.scenarios.storage package
- 1.1.1.1.1.3.1.1. yardstick.benchmark.scenarios.availability package
- 1.1.1.1.1.3.2. Submodules
- 1.1.1.1.1.3.3. yardstick.benchmark.scenarios.base module
- 1.1.1.1.1.3.4. Module contents
- 1.1.1.1.1.3.1. Subpackages
- 1.1.1.1.1.1. yardstick.benchmark.contexts package
- 1.1.1.1.2. Module contents
- 1.1.1.1.1. Subpackages
- 1.1.1.2. yardstick.cmd package
- 1.1.1.3. yardstick.common package
- 1.1.1.4. yardstick.dispatcher package
- 1.1.1.5. yardstick.orchestrator package
- 1.1.1.6. yardstick.plot package
- 1.1.1.7. yardstick.resources package
- 1.1.1.8. yardstick.vTC package
- 1.1.1.8.1. Subpackages
- 1.1.1.8.1.1. yardstick.vTC.apexlake package
- 1.1.1.8.1.1.1. Subpackages
- 1.1.1.8.1.1.1.1. yardstick.vTC.apexlake.experimental_framework package
- 1.1.1.8.1.1.1.1.1. Subpackages
- 1.1.1.8.1.1.1.1.1.1. yardstick.vTC.apexlake.experimental_framework.benchmarks package
- 1.1.1.8.1.1.1.1.1.1.1. Submodules
- 1.1.1.8.1.1.1.1.1.1.2. yardstick.vTC.apexlake.experimental_framework.benchmarks.benchmark_base_class module
- 1.1.1.8.1.1.1.1.1.1.3. yardstick.vTC.apexlake.experimental_framework.benchmarks.instantiation_validation_benchmark module
- 1.1.1.8.1.1.1.1.1.1.4. yardstick.vTC.apexlake.experimental_framework.benchmarks.instantiation_validation_noisy_neighbors_benchmark module
- 1.1.1.8.1.1.1.1.1.1.5. yardstick.vTC.apexlake.experimental_framework.benchmarks.multi_tenancy_throughput_benchmark module
- 1.1.1.8.1.1.1.1.1.1.6. yardstick.vTC.apexlake.experimental_framework.benchmarks.rfc2544_throughput_benchmark module
- 1.1.1.8.1.1.1.1.1.1.7. yardstick.vTC.apexlake.experimental_framework.benchmarks.test_benchmark module
- 1.1.1.8.1.1.1.1.1.1.8. Module contents
- 1.1.1.8.1.1.1.1.1.2. yardstick.vTC.apexlake.experimental_framework.constants package
- 1.1.1.8.1.1.1.1.1.3. yardstick.vTC.apexlake.experimental_framework.libraries package
- 1.1.1.8.1.1.1.1.1.4. yardstick.vTC.apexlake.experimental_framework.packet_generators package
- 1.1.1.8.1.1.1.1.1.4.1. Submodules
- 1.1.1.8.1.1.1.1.1.4.2. yardstick.vTC.apexlake.experimental_framework.packet_generators.base_packet_generator module
- 1.1.1.8.1.1.1.1.1.4.3. yardstick.vTC.apexlake.experimental_framework.packet_generators.dpdk_packet_generator module
- 1.1.1.8.1.1.1.1.1.4.4. Module contents
- 1.1.1.8.1.1.1.1.1.1. yardstick.vTC.apexlake.experimental_framework.benchmarks package
- 1.1.1.8.1.1.1.1.2. Submodules
- 1.1.1.8.1.1.1.1.3. yardstick.vTC.apexlake.experimental_framework.api module
- 1.1.1.8.1.1.1.1.4. yardstick.vTC.apexlake.experimental_framework.benchmarking_unit module
- 1.1.1.8.1.1.1.1.5. yardstick.vTC.apexlake.experimental_framework.common module
- 1.1.1.8.1.1.1.1.6. yardstick.vTC.apexlake.experimental_framework.deployment_unit module
- 1.1.1.8.1.1.1.1.7. yardstick.vTC.apexlake.experimental_framework.heat_manager module
- 1.1.1.8.1.1.1.1.8. yardstick.vTC.apexlake.experimental_framework.heat_template_generation module
- 1.1.1.8.1.1.1.1.9. Module contents
- 1.1.1.8.1.1.1.1.1. Subpackages
- 1.1.1.8.1.1.1.1. yardstick.vTC.apexlake.experimental_framework package
- 1.1.1.8.1.1.2. Submodules
- 1.1.1.8.1.1.3. yardstick.vTC.apexlake.setup module
- 1.1.1.8.1.1.4. Module contents
- 1.1.1.8.1.1.1. Subpackages
- 1.1.1.8.1.1. yardstick.vTC.apexlake package
- 1.1.1.8.2. Module contents
- 1.1.1.8.1. Subpackages
1.1.2. Submodules¶
1.1.3. yardstick.main module¶
yardstick - command line tool for managing benchmarks
Example invocation: $ yardstick task start samples/ping.yaml
Servers are the same as VMs (Nova calls them servers in the API)
Many tests use a client/server architecture. A test client is configured to use a specific test server e.g. using an IP address. This is true for example iperf. In some cases the test server is included in the kernel (ping, pktgen) and no additional software is needed on the server. In other cases (iperf) a server process needs to be installed and started.
One server is required to host the test client program (such as ping or iperf). In the task file this server is called host.
A server can be the _target_ of a test client (think ping destination argument). A target server is optional but needed in most test scenarios. In the task file this server is called target. This is probably the same as DUT in existing terminology.
Existing terminology: https://www.ietf.org/rfc/rfc1242.txt (throughput/latency) https://www.ietf.org/rfc/rfc2285.txt (DUT/SUT)
New terminology: NFV TST
1.1.4. yardstick.ssh module¶
High level ssh library.
Usage examples:
Execute command and get output:
ssh = sshclient.SSH(“root”, “example.com”, port=33) status, stdout, stderr = ssh.execute(“ps ax”) if status:
raise Exception(“Command failed with non-zero status.”)print stdout.splitlines()
Execute command with huge output:
- class PseudoFile(object):
- def write(chunk):
- if “error” in chunk:
- email_admin(chunk)
ssh = sshclient.SSH(“root”, “example.com”) ssh.run(“tail -f /var/log/syslog”, stdout=PseudoFile(), timeout=False)
Execute local script on remote side:
ssh = sshclient.SSH(“user”, “example.com”) status, out, err = ssh.execute(“/bin/sh -s arg1 arg2”,
stdin=open(“~/myscript.sh”, “r”))
Upload file:
ssh = sshclient.SSH(“user”, “example.com”) ssh.run(“cat > ~/upload/file.gz”, stdin=open(“/store/file.gz”, “rb”))
Eventlet:
eventlet.monkey_patch(select=True, time=True) or eventlet.monkey_patch() or sshclient = eventlet.import_patched(“opentstack.common.sshclient”)
-
class
yardstick.ssh.
SSH
(user, host, port=22, pkey=None, key_filename=None, password=None)[source]¶ Bases:
object
Represent ssh connection.
-
execute
(cmd, stdin=None, timeout=3600)[source]¶ Execute the specified command on the server.
Parameters: - cmd – Command to be executed.
- stdin – Open file to be sent on process stdin.
- timeout – Timeout for execution of the command.
Returns: tuple (exit_status, stdout, stderr)
-
run
(cmd, stdin=None, stdout=None, stderr=None, raise_on_error=True, timeout=3600)[source]¶ Execute specified command on the server.
Parameters: - cmd – Command to be executed.
- stdin – Open file or string to pass to stdin.
- stdout – Open file to connect to stdout.
- stderr – Open file to connect to stderr.
- raise_on_error – If False then exit code will be return. If True then exception will be raized if non-zero code.
- timeout – Timeout in seconds for command execution. Default 1 hour. No timeout if set to 0.
-
-
exception
yardstick.ssh.
SSHTimeout
[source]¶ Bases:
yardstick.ssh.SSHError