SuperluminalPerf is a small .NET managed wrapper around the Superluminal PerformanceAPI.
Superluminal is an outstanding profiler that supports .NET (Core, Framework) applications and provides mixed .NET and Native call stacks.
- One-to-One mapping with the native Superluminal PerformanceAPI (API Version
3.0
) - Compatible with
netstandard2.0
+ andnet6.0
+ - Provides binaries or source embedding through a single NuGet package
// Make sure to initialize Superluminal Performance API at the beginning of your app
// By default will try to load the Superluminal dll from Program files default installation path.
SuperluminalPerf.Initialize();
// If Superluminal is not installed in its default path, you'll have to provide an explicit path to the DLL:
// SuperluminalPerf.Initialize($@"E:\Superluminal\Performance\API\dll\{(IntPtr.Size == 8 ? "x64" : "x86")}\PerformanceAPI.dll");
// You can set the thread name
SuperluminalPerf.SetCurrentThreadName("Hello!");
// You can mark code with begin/end markers
SuperluminalPerf.BeginEvent("MyMarker");
Console.WriteLine("Hello World! Wait for 100ms");
Thread.Sleep(100);
SuperluminalPerf.EndEvent();
Running with Superluminal will produce the following markers:
SuperluminalPerf is available as a NuGet package:
SuperluminalPerf NuGet package comes with source included so that you can internalize your usage of SuperluminalPerf into your project. This can be useful in an environment where you can't easily consume NuGet references.
WARNING: Currently, the sources are not set as readonly, so you should not modify sources in that mode as it will modify the sources for other projects using SuperluminalPerf on your machine. Use this feature at your own risks!
In order to activate this feature you need to:
- Set the property
PackageSuperluminalPerfIncludeSource
totrue
in your project:<PropertyGroup> <PackageSuperluminalPerfIncludeSource>true</PackageSuperluminalPerfIncludeSource> </PropertyGroup>
- Add the
IncludeAssets="Build"
to the NuGet PackageReference for SuperluminalPerf:<ItemGroup> <PackageReference Include="SuperluminalPerf" Version="1.0.0" IncludeAssets="Build"/> </ItemGroup>
This software is released under the BSD-Clause 2 license.
Adapted logo performance
by Sophia Bai from the Noun Project
Alexandre Mutel aka xoofx.