Package-level declarations

Types

Link copied to clipboard

Collects Android hardware metadata without touching AI inference runtimes.

Link copied to clipboard

Runs a benchmark-scoped native Vulkan probe for custom Bonsai compute kernels.

Link copied to clipboard
internal data class AndroidBenchmarkVulkanProbeResult(val apiDetected: Boolean, val usable: Boolean, val summary: String)
Link copied to clipboard
data class BenchmarkAccelerationCapability(val accelerator: BenchmarkAccelerator, val apiDetected: Boolean, val status: BenchmarkAccelerationStatus)

Capability row rendered by the benchmark screen.

Link copied to clipboard

Runtime support status for an acceleration path used by local generation.

Link copied to clipboard

Hardware acceleration capabilities relevant for on-device image generation.

Link copied to clipboard
data class BenchmarkDeviceInfo(val platform: BenchmarkPlatform, val manufacturer: String, val model: String, val osVersion: String, val cpuName: String, val cpuCores: Int, val gpuName: String, val totalRamMb: Long, val availableRamMb: Long, val totalVramMb: Long?, val availableVramMb: Long?, val accelerators: List<BenchmarkAccelerator>, val acceleratorDiagnostics: List<String> = emptyList())

Static hardware snapshot collected without initializing inference runtimes.

Link copied to clipboard

Collects device information without loading AI model runtimes.

Link copied to clipboard

Reasons why a local request exceeds benchmark recommendations.

Link copied to clipboard
class BenchmarkManager(val deviceProbe: BenchmarkDeviceProbe, val scoreEngine: BenchmarkScoreEngine, val repository: BenchmarkRepository, val preferenceManager: PreferenceManager)

High-level API for the benchmark screen.

Link copied to clipboard

Platform family used by benchmark hardware probes.

Link copied to clipboard

Machine-readable reasons attached to provider recommendations.

Link copied to clipboard
data class BenchmarkProviderRecommendation(val provider: ServerSource, val recommended: Boolean, val width: Int, val height: Int, val samplingSteps: Int, val cfgScale: Float, val batchCount: Int, val estimatedTimeSeconds: Int, val backgroundGeneration: Boolean, val sdxlBackend: SdxlBackend, val issues: List<BenchmarkProviderIssue> = emptyList())

Conservative outcome for a concrete local generation provider.

Link copied to clipboard
data class BenchmarkRecommendation(val width: Int, val height: Int, val samplingSteps: Int, val cfgScale: Float, val batchCount: Int, val providers: List<ServerSource>, val backgroundGeneration: Boolean, val sdxlBackend: SdxlBackend)

Recommended local generation parameters derived from benchmark results.

Link copied to clipboard

Derives provider-specific settings from benchmark measurements.

Link copied to clipboard

Stores benchmark results in the local persistent database.

Link copied to clipboard
data class BenchmarkResult(val id: Long = 0, val createdAt: Long, val deviceInfo: BenchmarkDeviceInfo, val cpuScore: Int, val memoryScore: Int, val acceleratorScore: Int, val totalScore: Int, val estimatedTimeSeconds: Int, val recommendation: BenchmarkRecommendation, val providerRecommendations: List<BenchmarkProviderRecommendation> = emptyList(), val notes: List<String> = emptyList())

Persisted benchmark score with the device snapshot and recommendations.

Link copied to clipboard
internal class BenchmarkScoreEngine(val timeProvider: TimeProvider)

Runs a bounded synthetic benchmark and derives conservative recommendations.

Link copied to clipboard
private class InferenceLikeWorkload

Small deterministic workload shaped like diffusion inference stages.

Link copied to clipboard

Collects iOS hardware metadata without constructing Core ML pipelines.

Link copied to clipboard
private data class IosLocalGenerationProfile(val size: Int, val samplingSteps: Int, val estimatedTimeSeconds: Int, val backgroundGeneration: Boolean)
Link copied to clipboard
class LocalGenerationBenchmarkGate(val preferenceManager: PreferenceManager, val repository: BenchmarkRepository)

Enforces benchmark-related business dialogs before local generation starts.

Link copied to clipboard
sealed interface LocalGenerationGateResult

Decision returned before starting local generation.

Link copied to clipboard
data class LocalGenerationRequest(val source: ServerSource, val width: Int, val height: Int, val samplingSteps: Int, val batchCount: Int, val hiresFix: Boolean = false, val sdxlBackend: SdxlBackend = SdxlBackend.AUTO)

Compact generation request used for benchmark policy checks.

Link copied to clipboard

Room-backed benchmark repository.

Link copied to clipboard
private data class WorkloadScore(val score: Int, val elapsedMs: Int, val passes: Int)

Properties

Link copied to clipboard
private const val LIBRARY_NAME: String
Link copied to clipboard
private const val LOG_TAG: String
Link copied to clipboard
private const val SEPARATOR: String

Functions

Link copied to clipboard

Returns acceleration capabilities as runtime-backend support, not raw OS API presence.

Link copied to clipboard
private fun String.containsKeyValue(key: String, value: String): Boolean
Link copied to clipboard

Returns true when the source performs local on-device generation.

Link copied to clipboard

Returns the recommendation for a concrete local provider.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard