MiniProfiler for .NET Documentation Go to the repo

.NET Core (Console Applications)

If you’d rather learn by example, sample apps are available. The .NET Core Console sample is here, with the important bits in Program.cs.

Installation and Configuration

  • Install the NuGet Package: MiniProfiler.AspNetCore
    • Either use the NuGet UI to install MiniProfiler.AspNetCore (which has all needed dependencies)
    • Or use the Package Manager Console:
Install-Package MiniProfiler.AspNetCore -IncludePrerelease
  • Edit your Program.cs to configure MiniProfiler and start profiling:
public static void Main()
    // Default configuration usually works for most, but overrde, you can call:
    // MiniProfiler.Configure(new MiniProfilerOptions { ... });
    var profiler = MiniProfiler.StartNew("My Pofiler Name");
    using (profiler.Step("Main Work"))
        // Do some work...