Optick is a super-lightweight C++ profiler for Games.
It provides access for all the necessary tools required for efficient performance analysis and optimization:
instrumentation, switch-contexts, sampling, GPU counters.
Looking for 'Brofiler'? It has been renamed to 'Optick', so you are in the right place.
| Windows (x64: msvc) | Linux (x64: clang, gcc) | MacOS (x64: clang, gcc) | Static Code Analysis |
|---|---|---|---|
| Features | Windows | Linux | MacOS | XBox | PS4 |
|---|---|---|---|---|---|
| Instrumentation | ✔️ | ✔️ | ✔️ | ✔️ | ❔ |
| Switch Contexts | ✔️ ETW | ✔️ FTrace | ✔️ DTrace | ✔️ | ❔ |
| Sampling | ✔️ ETW | ⏳ | ⏳ | ❔ | ❔ |
| GPU | ✔️ D3D12, Vulkan | ✔️ Vulkan | ✔️ Vulkan |
✔️ - works out of the box, ⏳ - in progress, ❔ - will be available soon for the certified developers
- Copy 'src' folder from the repository or latest release to your game project
- Add
OPTICK_FRAME("MainThread");macro to the main loop of your game and#include "optick.h"header
#include "optick.h"
...
while( true )
{
OPTICK_FRAME("MainThread");
engine.Update();
}- Use
OPTICK_EVENT();macro to instrument a function
void SlowFunction()
{
OPTICK_EVENT();
...
}- Edit
optick.config.hto enable/disable some of the features in specific configs or platforms.
(e.g. disabling Optick in final builds)
⚠️ If your Game uses dynamic linking and you are planning to use Optick from multiple dlls within the same executable - please make sure that Optick's code is added to the common Dynamic Library and this library is compiled with OPTICK_EXPORT define (Static Library won't work).
You could also use precompiled OptickCore.dll which is packaged with every release:
- Add
includefolder to the extra include dirs of your project- Add
lib/x64/debugandlib/x64/releaseto the extra library dirs of your project- Copy
lib/x64/debug/OptickCore.dllandlib/x64/release/OptickCore.dllto the debug and release output folders of your project respectively
All the available API calls are documented here:
https://github.com/bombomby/optick/wiki/Optick-API
Run generate_projects.gpu.bat from the root folder to generate project files.
Open solution build\vs2017\Optick.sln with samples.
| WindowsD3D12 | WindowsVulkan | ConsoleApp |
|---|---|---|
![]() |
![]() |
![]() |
| DirectX12 multithreading sample with Optick integration | SaschaWillems's vulkan multithreading sample with Optick integration | Basic ConsoleApp with Optick integration (Windows, Linux, MacOS) |
Brofiler has been renamed into Optick starting from v1.2.0.
All the future development is going under the new name.
Cheatsheet for upgrading to the new version:
BROFILER_FRAME("MainThread");=>OPTICK_FRAME("MainThread");BROFILER_THREAD("WorkerThread");=>OPTICK_THREAD("WorkerThread");BROFILER_CATEGORY("Physics", Brofiler::Color::Green);=>OPTICK_CATEGORY("Physics", Optick::Category::Physics);BROFILER_EVENT(NAME);=>OPTICK_EVENT(NAME);PROFILE;=>OPTICK_EVENT();
You can find a short instruction here:
https://github.com/bombomby/optick/wiki/How-to-start%3F-(Programmers-Setup)




