in benchmarks/multiplatform/benchmarks/src/commonMain/kotlin/Benchmarks.kt [255:282]
suspend fun runBenchmarks(
width: Int = 1920,
height: Int = 1080,
targetFps: Int = 120,
warmupCount: Int = 100,
graphicsContext: GraphicsContext? = null
) {
println()
println("Running emulating $targetFps FPS")
println()
runBenchmark("AnimatedVisibility", width, height, targetFps, 1000, graphicsContext, warmupCount) { AnimatedVisibility() }
runBenchmark("LazyGrid", width, height, targetFps, 1000, graphicsContext, warmupCount) { LazyGrid() }
runBenchmark("LazyGrid-ItemLaunchedEffect", width, height, targetFps, 1000, graphicsContext, warmupCount) {
LazyGrid(smoothScroll = false, withLaunchedEffectInItem = true)
}
runBenchmark("LazyGrid-SmoothScroll", width, height, targetFps, 1000, graphicsContext, warmupCount) {
LazyGrid(smoothScroll = true)
}
runBenchmark("LazyGrid-SmoothScroll-ItemLaunchedEffect", width, height, targetFps, 1000, graphicsContext, warmupCount) {
LazyGrid(smoothScroll = true, withLaunchedEffectInItem = true)
}
runBenchmark("VisualEffects", width, height, targetFps, 1000, graphicsContext, warmupCount) { NYContent(width, height) }
runBenchmark("LazyList", width, height, targetFps, 1000, graphicsContext, warmupCount) { MainUiNoImageUseModel()}
runBenchmark("MultipleComponents", width, height, targetFps, 1000, graphicsContext, warmupCount) { MultipleComponentsExample() }
runBenchmark("MultipleComponents-NoVectorGraphics", width, height, targetFps, 1000, graphicsContext, warmupCount) {
MultipleComponentsExample(isVectorGraphicsSupported = false)
}
}