Performance profiling #900
Replies: 5 comments
-
Also, do we want to do regression/performance tests only on rendering? |
Beta Was this translation helpful? Give feedback.
-
Do we want to monitor the binary size? We could also publish transformed datas/graph every time a new data set is commited to this repo. |
Beta Was this translation helpful? Give feedback.
-
Thanks for starting this discussion @CedricGuillemet! Some thoughts:
As far as where the data is stored, we possibly could log it to PowerBI and then create all kinds of charts and dashboards from that data. I'm sure there are other options too. |
Beta Was this translation helpful? Give feedback.
-
We can test shader performance. I don't think it's tested on JS side but it might be interesting to check for regression as well. |
Beta Was this translation helpful? Give feedback.
-
Looking at Chrome profiling JSON/flame graph made me realize that 2 types of profiling datas are available and not the same nature:
Because of that, Resources checks can happen in ValidationTests with a Reference JSON containing infos per scene. |
Beta Was this translation helpful? Give feedback.
-
Starting discussion here. An issue will be open once rough specs will be determined.
Idea is to measure performance (CPU, GPU, CPU ram, GPU ram, latencies, I/O,...) between 2 PRs to avoid regression and help find bottlenecks.
related issue : #518
Use of Validation Tests
Validationt test provides a good set of scenes to test. We can add more. But most tests render only a few frames or just 1. Not enough for CPU/GPU profiling. We can use Validation tests as a base but script will be different with mutualized parts.
Data output
Write a json with metrics and compare them with reference in repo (just like VT reference images)
bgfx provides statistics:
Many things like GPU timing and estimate of memory used:
https://bkaradzic.github.io/bgfx/bgfx.html#_CPPv4N4bgfx5StatsE
We can expose that from nativeEngine, testUtils plugin, other ?
Frame statistics
Number of frames rendered must be enough to have solid datas and 1st frames must not be taken into account (driver may actually commit texture loading when used with d3d. Not sure for other platforms)
Use of CI agents
It's not possible to have reliable timings on the CI. Agents are different. Just check the build time delta between 2 PRs to see how volatile timings are.
A self owned station can be used to build and run tests. We will have to do something similar for Apple platforms as it's not possible to test on CI.
Code introspection and/or tools
We can hook performance checks in various places for (# of calls, CPU timings), in native or JS sides. I'm not a big fan of adding macros or calls behind #idef everywhere in the code.
I'd prefer external tools like Event Tracing for Windows (ETW)
https://docs.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-recorder
When to test?
If 1000 frames are rendered for each test, on 1 or more platform, CI Build time will skyrocket. On the other hand, being able to get statistics and regression for a specific branch can be invaluable. Maybe nightly GitHub action + the possibility to check any branch at will is better.
Proposal
=> enough to test performance between 2 branches locally
Beta Was this translation helpful? Give feedback.
All reactions