-
-
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)
- Brofiler.h (Header to include)
- ProfilerCore64.lib (Library to link)
- ProfilerCore64.dll (DLL with implementation)
- EasyHook64.dll (EasyHook)
- ProfilerTest64.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 BROFILER_FRAME macros:
#include "Brofiler.h"
while(true)
{ BROFILER_FRAME("YourThreadName")
...
}
- Copy ProfilerCore64.dll and EasyHook64.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 "Brofiler.h"
//Just add BROFILE macros at the beginning of a function
void Engine::UpdateInput()
{ BROFILE
}
Add some profiling categories to your code (colorized counters).
#include "Brofiler.h"
//There is a lot of predefined standard colors
void Engine::UpdateLogic()
{ BROFILER_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.