Skip to main content

BenchmarkingCLI

A command-line tool for running latency benchmarks on Android devices. This tool automates the process of pushing benchmark binaries to connected Android devices, executing latency tests, and collecting performance metrics in CSV format.

Features

  • Latency Testing: Measure memory latency across different buffer sizes on a specific core
  • Loaded Latency Testing (v0.3+): Measure latency under concurrent bandwidth loads with configurable kernel modes and thread settings
  • GPU Loaded Latency Testing (v0.4+): Measure memory latency under concurrent GPU load
  • CSV Export: Results are automatically parsed and exported to timestamped CSV files
  • CLI Interface: Easy-to-use command-line interface

Requirements

Host Machine

  • Python: 3.8 or higher
  • Android Debug Bridge (ADB): Version 1.0.40+
    • Linux: apt-get install android-tools-adb
    • macOS: brew install android-platform-tools
    • Windows: Download the SDK Platform Tools and add to PATH
    • Verify installation: adb version

Android Device

  • USB debugging must be enabled on the device. To enable it:
    1. Go to Settings → About Phone
    2. Tap Build Number 7 times until you see "You are now a developer"
    3. Go to Settings → Developer Options
    4. Enable USB Debugging
  • Connect the device via USB and accept the "Allow USB Debugging" prompt on the device
  • Confirm the device is detected: adb devices

Installation

Install directly from PyPI:

pip install benchmarkingcli

Usage

Latency Test

Run a basic latency benchmark on a specific core:

# Run on default core (7)
benchmarkingcli latency

# Run on a specific core
benchmarkingcli latency --core 4

Parameters:

  • --core: CPU core to run the latency test on (default: 7)
  • --output-dir: Directory to save results (default: current directory)

Output

Results are exported as CSV files with the following columns:

  • buffer_size_kb: Size of the buffer tested (in KB)
  • min_ns: Minimum latency (nanoseconds)
  • mean_ns: Mean latency (nanoseconds)
  • max_ns: Maximum latency (nanoseconds)

Example output file: latency_results_20260427_115540.csv

Loaded Latency Test (v0.3+)

Run a latency benchmark under concurrent bandwidth load:

# Run with default settings
benchmarkingcli loadedlatency

# Run with custom configuration
benchmarkingcli loadedlatency --lat-buffer-mb 128 --bw-buffer-mb 128 --latency-core 7 --bw-cores 0,1,2,3 --kernel-mode TRIAD --ilp 4 --injection-rate desc --output-dir ./results

Parameters:

  • --lat-buffer-mb: Latency buffer size in MB (default: 128)
  • --bw-buffer-mb: Bandwidth buffer size in MB (default: 128)
  • --latency-core: Core to run latency thread on (default: 7)
  • --bw-cores: Comma-separated cores for bandwidth threads (default: 0,1,2,3,4,5)
  • --kernel-mode: Kernel mode: SUM/COPY/UPDATE/TRIAD or 1/2/3/4 (default: TRIAD)
  • --ilp: Unroll factor: 1/2/4/8/16/32 (default: 4)
  • --injection-rate: Injection rate: asc or desc (default: asc)
  • --output-dir: Directory to save results (default: current directory)

Important Update (v0.4+): The --tile-delay-sweep-order parameter has been renamed to --injection-rate. Supported values are asc and desc.

GPU Loaded Latency Test (v0.4+)

Run a latency benchmark under concurrent GPU load:

# Run with default settings
benchmarkingcli gpuloadedlatency

# Run with custom configuration
benchmarkingcli gpuloadedlatency --latency-core 7 --lat-buffer-mb 128 --gpu-buffer-mb 128 --kernel-mode TRIAD --output-dir ./results

Parameters:

  • --latency-core: Core to run latency thread on (default: 7)
  • --lat-buffer-mb: Latency buffer size in MB (default: 128)
  • --gpu-buffer-mb: GPU workload buffer size in MB (default: 128)
  • --kernel-mode: Kernel mode: SUM/COPY/UPDATE/TRIAD or 1/2/3/4 (default: TRIAD)
  • --output-dir: Directory to save results (default: current directory)

Troubleshooting

"No ADB devices found"

  • Check that your Android device is connected: adb devices
  • Ensure USB debugging is enabled on the device
  • Try: adb kill-server then adb start-server

"Latency test binary not found"

  • Reinstall the package: pip install --force-reinstall benchmarkingcli

Binary push fails

  • Check device storage: adb shell df /data/local/tmp
  • Verify ADB permissions: adb shell ls -la /data/local/tmp

Metadata

Release files for benchmarkingcli 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for benchmarkingcli 0.4.2
File Size Uploaded Provenance Actions
benchmarkingcli-0.4.2.tar.gz 2.1 MB Without provenance Details for benchmarkingcli-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for benchmarkingcli 0.4.2
File Interpreter ABI Platform Actions
benchmarkingcli-0.4.2-py3-none-any.whl Python 3 none any Details for benchmarkingcli-0.4.2-py3-none-any.whl

Total release size: 4.2 MB

Release files / benchmarkingcli-0.4.2.tar.gz

Download URL benchmarkingcli-0.4.2.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a33bfcd9abe8ad4fb69782f06639fa2ec3f721360ae11f04226c90ccb68abb39
BLAKE2b-256 checksum
How to use checksums
27150de58fd9ce0f5a7e5f5713a08507fff726e20c08155bcf39bfe186232e43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / benchmarkingcli-0.4.2-py3-none-any.whl

Download URL benchmarkingcli-0.4.2-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
aa73e9d2f67d0674346c38466c936bea718886aadc737f73c44ecf612c128418
BLAKE2b-256 checksum
How to use checksums
83c960d43e3a405954e3a3b6fdc04f77b58eba0c6159c0141b5832abd2fd481a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for benchmarkingcli 0.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page