-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmarks. Change output format and modes #5217
base: master
Are you sure you want to change the base?
Conversation
08339a5
to
f22c2e1
Compare
f22c2e1
to
769a2df
Compare
val percentileCPUAverage: List<BenchmarkPercentileAverage>, | ||
val percentileGPUAverage: List<BenchmarkPercentileAverage>, | ||
val noBufferingMissedFrames: MissedFrames, | ||
val doubleBufferingMissedFrames: MissedFrames | ||
) { | ||
fun prettyPrint() { | ||
if (Args.isModeEnabled(Mode.CPU)) { | ||
println("$frameCount frames CPU render time: $renderTime") | ||
println("Version: " + Args.versionInfo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not print a version if it is not set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
listOf(0.01, 0.02, 0.05, 0.1, 0.25, 0.5).map { percentile -> | ||
conditions, | ||
averageFrameInfo, | ||
listOf(0.01, 0.02, 0.05, 0.1, 0.25, 0.5).map { percentile -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -8,6 +8,9 @@ import kotlin.time.Duration | |||
import kotlin.time.Duration.Companion.nanoseconds | |||
import kotlin.time.ExperimentalTime | |||
import kotlinx.coroutines.* | |||
import org.jetbrains.skia.Color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it from previous PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -9,3 +9,8 @@ fun main(args : List<String>) { | |||
Args.parseArgs(args.toTypedArray()) | |||
runBlocking { runBenchmarks(graphicsContext = graphicsContext()) } | |||
} | |||
|
|||
actual fun saveBenchmarksOnDisk(name: String, stats: BenchmarkStats) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it second actual implementation for iOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. Messed up with interactive rebase, and didn't check compilation on macOs 🫠
@@ -8,3 +8,7 @@ fun main(args : Array<String>) { | |||
Args.parseArgs(args) | |||
runBlocking { runBenchmarks(graphicsContext = graphicsContext()) } | |||
} | |||
|
|||
actual fun saveBenchmarksOnDisk(name: String, stats: BenchmarkStats) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it second actual implementation for macOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
} | ||
|
||
expect fun saveBenchmarksOnDisk(name: String, stats: BenchmarkStats) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to saveBenchmarkStatsOnDisk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
import java.time.LocalDateTime | ||
import java.time.format.DateTimeFormatter | ||
|
||
actual fun saveBenchmarksOnDisk(name: String, stats: BenchmarkStats) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have not you tried kotlinx.io to make it common?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also checked that iOS/wasm work as before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked native macOs - it saves files
Mode.CPU
now measures GPU, rename it toSIMPLE
FRAMES
andSIMPLE
is only in vsync, rename it toVSYNC_EMULATION
Mode.FRAMES_GPU
, as it affects only outputExample of output into console: