Shiny: C++ Profiler: Main Page

- Main Page
- Files

# Shiny: C++ Profiler Documentation

## Introduction

Goto the documentation here: ShinyDoc.h

### 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.

### What is this document?

ShinyDoc.h is a complete description of all the Shiny macros. Macro is a preprocessor directive that provides a mechanism for token replacement in your source code. Shiny uses macros to simplify interface and remain powerful. If the preprocessor SHINY_PROFILER is FALSE macro is ignored unless specified otherwise.

### Where can I download Shiny?

Browse All Files

### Where can I download 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:

- Lightning fast and accurate profiling.
- Self-initialization: no explicit starting point.
- Ridiculously easy and minimal interface.
- Nicely formatted output with customizable display.
- Call-tree with recursion and child-to-parent relationship timing.
- Smooth averages support for main-loop projects, typically games.
- Static combinded with internal pool memory manager for negligible presence.
- Platform-independent clean source code without GPL restrictions.
- Well documentation and example rich.

### 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.

Copyright © 2007-2008 by Aidin Abedi