Skip to main content

Low Latency test case using ByteBlower.

Project description

Introduction

This package contains a test case to generate multiple types of traffic patterns using the ByteBlower Test Framework. The traffic patterns are used to validate your network for low latency.

For more detailed documentation, please have a look at Test Case: Low Latency in the ByteBlower API documentation.

Release notes

What can this version bring to you? See our exciting new and existing features below!

📢 New since v1.2.0! 📢

It is with great pleasure that we announce our new features of this test case!

📢 New since v1.1.0! 📢

It is with great pleasure that we announce our new features of this test case!

We also fixed some inconsistencies in the command-line interface and configuration file:

  • Command-line interface: Default search path for the configuration file is now the current directory instead of looking in an examples sub-directory. This makes it more convenient for the user and consistent with the CLI of the ByteBlower Test Framework.

  • Command-line JSON configuration file: Deprecated napt_keep_alive in favor of nat_keep_alive. Done for naming consistency with the NAT-discovery IPv4 ports in ByteBlower Test Framework >= v1.2.0.

  • Changed rate-limiting parameter in the flow "type": "http" to maximum_bitrate (in bits per second). It replaces rate_limit which was in Bytes per second.

Installation

Requirements

Prepare runtime environment

We recommend managing the runtime environment in a Python virtual environment. This guarantees proper separation of the system-wide installed Python and pip packages.

Python

The ByteBlower Test Framework currently supports Python versions 3.7 up to 3.11.

Important: Working directory

All the following sections expect that you first moved to your working directory where you want to run this project. You may also want to create your configuration files under a sub-directory of your choice.

  1. On Unix-based systems (Linux, WSL, macOS):

    cd '/path/to/working/directory'
  2. On Windows systems using PowerShell:

    cd 'c:\path\to\working\directory'

Python virtual environment

Make sure to use the right Python version (>= 3.7, <= 3.11), list all Python versions installed in your machine by running:

  1. On Windows systems using PowerShell:

    py --list

If no Python version is in the required range, you can download and install Python 3.7 or above using your system package manager or from https://www.python.org/ftp/python.

Prepare Python virtual environment: Create the virtual environment and install/update pip and build.

  1. On Unix-based systems (Linux, WSL, macOS):

    Note: Mind the leading . which means sourcing ./.venv/bin/activate.

    python3 -m venv --clear .venv
    . ./.venv/bin/activate
    pip install -U pip build
  2. On Windows systems using PowerShell:

    Note: On Microsoft Windows, it may be required to enable the Activate.ps1 script by setting the execution policy for the user. You can do this by issuing the following PowerShell command:

    PS C:> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

    See About Execution Policies for more information.

    Make sure to specify the python version you’re using. For example, for Python 3.8:

    py -3.8 -m venv --clear .venv
    & ".\.venv\Scripts\activate.ps1"
    python -m pip install -U pip build

To install the ByteBlower low latency validation test case and its dependencies, first make sure that you have activated your virtual environment:

  1. On Unix-based systems (Linux, WSL, macOS):

    . ./.venv/bin/activate
  2. On Windows systems using PowerShell:

    ./.venv/Scripts/activate.ps1

Then, run:

pip install -U byteblower-test-cases-low-latency

Quick start

Command-line interface

After providing the appropriate test setup and flow configurations, the test script can be run either as python module or as a command-line script.

For example (to get help for the command-line arguments):

  1. As a python module:

    # To get help for the command-line arguments:
    python -m byteblower.test_cases.low_latency --help
  2. As a command-line script:

    # To get help for the command-line arguments:
    byteblower-test-cases-low-latency --help

For a quick start, you can run a simple test using the JSON configuration of one of the example files below:

Save you configuration in your working directory as low_latency.json. Make sure you change the "server" and "ports" configuration according to the setup you want to run your test on.

More detailed documentation is available in the Configuration file section of the documentation.

The low_latency.json can be used then to run the test in the command line interface using the following commands:

Note: The reports will be stored under a subdirectory reports/.

  1. On Unix-based systems (Linux, WSL, macOS):

    # Optional: create low_latency.json, then copy the configuration to it
    touch low_latency.json
    # Create reports folder to store HTML/JSON files
    mkdir reports
    # Run test
    byteblower-test-case-low-latency --report-path reports
  2. On Windows systems using PowerShell:

    # Optional: create low_latency.json, then copy the configuration to it
    New-Item low_latency.json
    # Create reports folder to store HTML/JSON files
    md reports
    # Run test
    byteblower-test-case-low-latency --report-path reports

Integrated

from byteblower.test_cases.low_latency import run

# Defining test configuration, report path and report file name prefix:
test_config = {} # Here you should provide your test setup + frame(s') configuration(s)
report_path = 'my-output-folder' # Optional: provide the path to the output folder, defaults to the current working directory
report_prefix = 'my-dut-feature-test' # Optional: provide prefix of the output files, defaults to 'report'

# Run the low latency validation test:
run(test_config, report_path=report_path, report_prefix=report_prefix)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file byteblower_test_cases_low_latency-1.2.2.tar.gz.

File metadata

File hashes

Hashes for byteblower_test_cases_low_latency-1.2.2.tar.gz
Algorithm Hash digest
SHA256 56d4394a0d57405248d7d4b5926471115eaf39e3dd03e576cd13c6ae70754727
MD5 2d479b38d0af177f52c09b402bf79cf8
BLAKE2b-256 d7bdf07d2d367fc87947d2d5e108334fcdd223f79668e5bc582fbcd1ff685ee3

See more details on using hashes here.

File details

Details for the file byteblower_test_cases_low_latency-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for byteblower_test_cases_low_latency-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5246f6fa9cbb1c40ae9a707a1fca2f3428a89d7a6b803229190a92a0ada194ce
MD5 237d3bf2b6f811617c1a51f9f58ea336
BLAKE2b-256 4ce16f96eced8436334463e9980a7929c85cd22bc34ea95e65f383e40c3a3c82

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page