Package-level declarations

Types

Link copied to clipboard
data class BenchmarkResult(val elapsed: Duration, val success: Boolean, val errorMessage: String? = null)

Benchmark metrics for a single BLE operation with success/failure tracking.

Link copied to clipboard
class BleBenchmark(timeSource: TimeSource = TimeSource.Monotonic)

Lightweight benchmark utility for measuring BLE operation latency and throughput.

Link copied to clipboard
data class LatencyStats(val label: String, val count: Int, val min: Duration, val max: Duration, val mean: Duration, val p50: Duration, val p95: Duration, val p99: Duration)

Statistical summary of latency measurements.

Link copied to clipboard
class LatencyTracker(timeSource: TimeSource = TimeSource.Monotonic)

Collects latency samples and computes percentile statistics. Not thread-safe - confine to a single coroutine or use external serialization.

Link copied to clipboard
class ThroughputMeter(timeSource: TimeSource = TimeSource.Monotonic)

Measures data throughput for BLE transfer operations.

Link copied to clipboard
data class ThroughputResult(val label: String, val totalBytes: Long, val sampleCount: Long, val duration: Duration)

Result of a throughput measurement.

Link copied to clipboard
data class TimingResult<T>(val label: String, val duration: Duration, val value: T)

Result of a single timed operation.

Functions

Link copied to clipboard
suspend fun <T> bleStopwatch(label: String, timeSource: TimeSource = TimeSource.Monotonic, block: suspend () -> T): TimingResult<T>

Measure the duration of a suspending BLE operation.