8000 GitHub - nicexp/optick: C++ Profiler For Games
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nicexp/optick

 
 

Repository files navigation

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.

Build Status

Windows Linux MacOS
Windows Build status Linux+MacOS Build Status Linux+MacOS Build Status

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

Basic Integration (one line of code)

  1. Copy 'src' folder from the repository or latest release to your game project
  2. 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();
}
  1. Use OPTICK_EVENT(); macro to instrument a function
void SlowFunction()
{ 
	OPTICK_EVENT();
	...
}
  1. Edit optick.config.h to enable/disable some of the features in specific configs or platforms.
    (e.g. disabling Optick in final builds)

API

All the available API calls are documented here:
https://github.com/bombomby/optick/wiki/Optick-API

Samples

Run generate_projects.gpu.bat from the root folder to generate project files.
Open solution build\vs2017\Optick.sln with samples.

WindowsD3D12 WindowsVulkan ConsoleApp
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)

How To Start?

You can find a short instruction here:
https://github.com/bombomby/optick/wiki/How-to-start%3F-(Programmers-Setup)

About

C++ Profiler For Games

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 62.7%
  • C++ 34.9%
  • Lua 0.9%
  • Batchfile 0.8%
  • C 0.3%
  • CMake 0.2%
  • HLSL 0.2%
0