What is Shiny?
Shiny is a low overhead, well documented and lightning fast C++ profiler. Easy to use on existing projects, no extensive surgery, just have fun with it. Nicely formatted output provides call tree (call graph), flat profile and is simple to custom display.
Why did you create Shiny?
I was working on a graphics engine and I wanted to see the fruit of my optimizations and growth to each critical part. I needed something accurate, adapted to my main-loop & display and disgusting fast.
What’s the difference between other profilers?
Most profilers are external tools and can’t adapt to the way your project is designed. The rest aren’t really powerful enough. Shiny can adapt to your code flow and your display by your choice. Optimized to the bone, delivers both call tree/graph and flat profile and is so easy to use you’ll never look at another profiler again.
What features does Shiny support?
Where are some key features:
• Self-initialized profiler.
• Well documentation and example rich.
• Lightning fast and accurate profiling.
• Ridiculously easy to use and minimal interface: 1 call per profile and 2 calls at minimum.
• Nicely formatted output with customizable display.
• Call-tree with recursion and flat profile layout.
• Average and last time values for frame-loop-based projects.
• Exponential moving average damping factor.
• Negligible memory pool allocation.
• Child, parent and total relationship timing between profiles.
• Platform-independent clean open source code.
How to switch Shiny on and off?
Shiny is turned on or off at compile time. Define the pre-processor SHINY_PROFILER to TRUE or FALSE to enable or disable, before including header Shiny.h. Shiny can also be enabled or disabled in ShinyConfig.h. Default is on.
Does Shiny support C language?
No. I currently have no future plans to support C, although it is easy to adapt Shiny for C without touching the interface.
Is Shiny thread-safe?
Not yet.
Why is profile data zero?
PROFILER_UPDATE must be called before outputting profile data.
How to output latest profile data instead of averages?
Set damping to zero when calling PROFILER_UPDATE.
In code: PROFILER_UPDATE(0);
Why is profile data "hit" count a floating-point?
Shiny uses the exponential moving average to calculate floating-point values for the latest profile data values. This can be customized by the damping parameter for PROFILER_UPDATE.
Why is some profile data leaping seconds back or forward in time?
Your platform has broken support for multi-core or multi-processor high-performance timing. You can solve this in three ways in Windows:
• (Recommended) Download the fix for this from Microsoft website.
• Call SetProcessAffinityMask or SetThreadAffinityMask at start of program to lock to a specific CPU.
• (Not Recommended) Use timeGetTime instead of QueryPerformanceCounter in the Shiny source code.