You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

14 lines
519 B

import androidx.compose.runtime.Composable
import benchmarks.animation.AnimatedVisibility
import benchmarks.lazygrid.LazyGrid
import benchmarks.visualeffects.NYContent
fun runBenchmark(name: String, frameCount: Int, content: @Composable () -> Unit) {
println("$name: " + measureComposable(frameCount, content))
}
fun runBenchmarks() {
runBenchmark("AnimatedVisibility", 1000000) { AnimatedVisibility() }
runBenchmark("LazyGrid",2000) { LazyGrid() }
runBenchmark("VisualEffects",1000) { NYContent() }
}