suspend fun runBenchmark()

in benchmarks/multiplatform/benchmarks/src/commonMain/kotlin/Benchmarks.kt [226:253]


suspend fun runBenchmark(
    name: String,
    width: Int,
    height: Int,
    targetFps: Int,
    frameCount: Int,
    graphicsContext: GraphicsContext?,
    warmupCount: Int = 100,
    content: @Composable () -> Unit
) {
    if (Config.isBenchmarkEnabled(name)) {
        println("# $name")
        val stats = measureComposable(
            name = name,
            warmupCount = warmupCount,
            frameCount = Config.getBenchmarkProblemSize(name, frameCount),
            width = width,
            height = height,
            targetFps = targetFps,
            graphicsContext = graphicsContext,
            content = content
        ).generateStats()
        stats.prettyPrint()
        if (Config.saveStats()) {
            saveBenchmarkStats(name = name, stats = stats)
        }
    }
}