Unofficial C# bindings for Tracy
This project is not related to Tracy Profiler, this is a third-party project
The version of the package might not match the actual version of Tracy being used
its called per.tracy instead of like tracy.net or smth cuz i initially made it for my engine
syntax almost the same as in c++ achieved using Metalama
enable by defining TracyEnable
:
<Project Sdk="Microsoft.NET.Sdk">
<!-- ... -->
<PropertyGroup>
<DefineConstants>TracyEnable</DefineConstants>
</PropertyGroup>
<!-- ... -->
</Project>
call Profiler.<TracyMacroName>
to use the profiler (without N/C/NC suffix)
only string literals are supported for string arguments!!
Enable automatic zones to add a zone to every method in every type in your project and projects that depend on your project
To enable automatic zones, define TracyAutoZones
:
<Project Sdk="Microsoft.NET.Sdk">
<!-- ... -->
<PropertyGroup>
<DefineConstants>TracyEnable;TracyAutoZones</DefineConstants>
</PropertyGroup>
<!-- ... -->
</Project>
- clone the repo
git clone https://github.com/cgytrus/PER.Tracy
- cd into native project directory
cd ./PER.Tracy/PER.Tracy.Native
- create build directory
mkdir ./build/win-x64
/mkdir ./build/linux-x64
- cd into build directory
cd ./build/win-x64
/cd ./build/linux-x64
- configure cmake
cmake ../../
- build native project
cmake --build . --config Release
- build solution
cd ../../ && dotnet build -c Release