Skip to main content

Android SoC benchmarking CLI for latency, loaded latency, and memory subsystem characterization

Project description

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
  • 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 --tile-delay-sweep-order 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)
  • --tile-delay-sweep-order: Tile delay sweep order: asc or desc (default: desc)
  • --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

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

benchmarkingcli-0.3.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

benchmarkingcli-0.3.0-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file benchmarkingcli-0.3.0.tar.gz.

File metadata

  • Download URL: benchmarkingcli-0.3.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for benchmarkingcli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 e7cd902d2739aa84ffd5d87043aaf9501850cb54b6fd9d59c86f84b90135eff3
MD5 3e0fab1f49da5ab9e24c66b9ca22e860
BLAKE2b-256 8c057d86d45c04cec87f86d5faf637478e64c2b1655c5c6349d77184cf95bdf7

See more details on using hashes here.

File details

Details for the file benchmarkingcli-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for benchmarkingcli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c84a6f125dbb233d166bbbcaf594105693fa3cd7eb876e69bf6ec87948b3df5
MD5 97260822649d7871714598ec630bcb5b
BLAKE2b-256 bdb1a6b280cd3cd63d0b2e1d6173859e354ccceac86cb7dab5f1a361eef24cc2

See more details on using hashes here.

Supported by

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