-
-
Notifications
You must be signed in to change notification settings - Fork 296
Home
Download and unzip archive with precompiled libraries:
- Brofiler.exe (GUI for visualizing results)
- Profiler.h (Header to include)
- ProfilerCore.lib (Library to link)
- ProfilerCore.dll (DLL with implementation)
- EasyHook32.dll (EasyHook)
- ProfilerTest.exe (Small console application to test profiler)
- Add recently unpacked directory to Project Properties -> C/C++ -> Additional Include Directories
- Add ProfilerCore.lib to Project Properties -> Linker -> Input -> Additional Dependencies
- Find Main Loop of your Game and insert PROFILER_FRAME macros:
#include "Profiler.h"
while(true)
{ PROFILER_FRAME
...
}
- Copy ProfilerCore.dll and EasyHook32.dll to your working directory
Launch your Game.
Launch Brofiler.exe.
Click Start Button .
When you are ready click Stop Button .
If your see a picture similar to this one - everything is OK, move to the next step.
Add some profiling counters to your code.
#include "Profiler.h"
//Just add PROFILE macros at the beginning of the function
void Engine::UpdateInput()
{ PROFILE
}
Add some profiling categories to your code (colorized counters).
#include "Profiler.h"
//There is a lot of predefined standard colors
void Engine::UpdateLogic()
{ PROFILER_CATEGORY( "UpdateLogic", Profiler::Color::Orchid )
}
Check suspect functions in the table.
From now these functions are marked for sampling.
All the code inside the scope of these functions will be sampled during next run.
Click Start Button to start new profiling run, press Stop Button to get results.
Click to clear all sampling scopes.
Open any Sampling Frame. Click a checkbox in the table with sampling results to inject profiler counter inside this function.
Get another profining run.
Click to remove all injected counters.
Double click on any row in the table will open Source View window.
Click to save *.prof file with active session.
Drag and Drop any *.prof file on the timeline to load it.