We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e1810c commit b463a44Copy full SHA for b463a44
1 file changed
benchmarks/multiplatform/benchmarks/src/commonMain/kotlin/MeasureComposable.kt
@@ -57,21 +57,24 @@ suspend fun measureComposable(
57
repeat(warmupCount) {
58
scene.render(canvas, it * nanosPerFrame)
59
surface.flushAndSubmit(false)
60
+ graphicsContext?.awaitGPUCompletion()
61
}
62
- graphicsContext?.awaitGPUCompletion()
63
-
64
runGC()
65
66
var renderTime = Duration.ZERO
+ var gpuTime = Duration.ZERO
67
if (Args.isModeEnabled(Mode.CPU)) {
68
renderTime = measureTime {
69
repeat(frameCount) {
70
71
72
+ gpuTime += measureTime {
73
74
+ }
75
76
77
+ renderTime -= gpuTime
78
79
80
val frames = MutableList(frameCount) {
0 commit comments