Rework Performance Statistics

We used instantaneous values for FPS previously which led to a lot of variation in it and the inability to determine a proper FPS value due to constant fluctuations. All FPS values are now averaged to allow reading out a stable value and a deviation statistic has been added for the frame-time to judge judder and frame-pacing which allows for a significantly better measure of overall performance. The formatting for all the floating-point numbers is now fixed-point to prevent shifting of position due to decimal digits becoming 0.
This commit is contained in:
PixelyIon
2021-06-27 06:56:16 +05:30
committed by ◱ Mark
parent ce804254ab
commit 6595670a5d
5 changed files with 38 additions and 16 deletions

View File

@ -40,7 +40,9 @@ namespace skyline::gpu {
static constexpr size_t MaxSwapchainImageCount{6}; //!< The maximum amount of swapchain textures, this affects the amount of images that can be in the swapchain
std::array<std::shared_ptr<Texture>, MaxSwapchainImageCount> images; //!< All the swapchain textures in the same order as supplied by the host swapchain
u64 frameTimestamp{}; //!< The timestamp of the last frame being shown
u64 frameTimestamp{}; //!< The timestamp of the last frame being shown in nanoseconds
u64 averageFrametimeNs{}; //!< The average time between frames in nanoseconds
u64 averageFrametimeDeviationNs{}; //!< The average deviation of frametimes in nanoseconds
perfetto::Track presentationTrack; //!< Perfetto track used for presentation events
std::thread choreographerThread; //!< A thread for signalling the V-Sync event using AChoreographer