Skip to main content

MiniProfiler.Settings

Various configuration properties.

Assembly: ServiceStack.NetFramework.dll
View Source
Declaration
public static class Settings

Properties

AssembliesToExclude

Assemblies to exclude from the stack trace report.

View Source
Declaration
public static IEnumerable<string> AssembliesToExclude { get; }

TypesToExclude

Types to exclude from the stack trace report.

View Source
Declaration
public static IEnumerable<string> TypesToExclude { get; }

MethodsToExclude

Methods to exclude from the stack trace report.

View Source
Declaration
public static IEnumerable<string> MethodsToExclude { get; }

StackMaxLength

The max length of the stack string to report back; defaults to 120 chars.

View Source
Declaration
public static int StackMaxLength { get; set; }

TrivialDurationThresholdMilliseconds

Any Timing step with a duration less than or equal to this will be hidden by default in the UI; defaults to 2.0 ms.

View Source
Declaration
public static decimal TrivialDurationThresholdMilliseconds { get; set; }

PopupShowTimeWithChildren

Dictates if the "time with children" column is displayed by default, defaults to false. For a per-page override you can use .RenderIncludes(showTimeWithChildren: true/false)

View Source
Declaration
public static bool PopupShowTimeWithChildren { get; set; }

PopupShowTrivial

Dictates if trivial timings are displayed by default, defaults to false. For a per-page override you can use .RenderIncludes(showTrivial: true/false)

View Source
Declaration
public static bool PopupShowTrivial { get; set; }

PopupMaxTracesToShow

Determines how many traces to show before removing the oldest; defaults to 15. For a per-page override you can use .RenderIncludes(maxTracesToShow: 10)

View Source
Declaration
public static int PopupMaxTracesToShow { get; set; }

PopupRenderPosition

Dictates on which side of the page the profiler popup button is displayed; defaults to left. For a per-page override you can use .RenderIncludes(position: RenderPosition.Left/Right)

View Source
Declaration
public static RenderPosition PopupRenderPosition { get; set; }

ShowControls

Determines if min-max, clear, etc are rendered; defaults to false. For a per-page override you can use .RenderIncludes(showControls: true/false)

View Source
Declaration
public static bool ShowControls { get; set; }

ExcludeStackTraceSnippetFromSqlTimings

By default, SqlTimings will grab a stack trace to help locate where queries are being executed. When this setting is true, no stack trace will be collected, possibly improving profiler performance.

View Source
Declaration
public static bool ExcludeStackTraceSnippetFromSqlTimings { get; set; }

IgnoredPaths

When MiniProfiler.Start is called, if the current request url contains any items in this property, no profiler will be instantiated and no results will be displayed. Default value is { "/ssr-", "/content/", "/scripts/", "/favicon.ico" }.

View Source
Declaration
public static string[] IgnoredPaths { get; set; }

RouteBasePath

The path under which ALL routes are registered in, defaults to the application root. For example, "~/myDirectory/" would yield "/myDirectory/ssr-includes.js" rather than just "/mini-profiler-includes.js" Any setting here should be in APP RELATIVE FORM, e.g. "~/myDirectory/"

View Source
Declaration
public static string RouteBasePath { get; set; }

Storage

Understands how to save and load MiniProfilers. Used for caching between when a profiling session ends and results can be fetched to the client, and for showing shared, full-page results.

View Source
Declaration
public static IStorage Storage { get; set; }

SqlFormatter

The formatter applied to the SQL being rendered (used only for UI)

View Source
Declaration
public static ISqlFormatter SqlFormatter { get; set; }

Version

Assembly version of this dank MiniProfiler.

View Source
Declaration
public static string Version { get; }

ProfilerProvider

The provider used to provider the current instance of a provider This is also

View Source
Declaration
public static IProfilerProvider ProfilerProvider { get; set; }

Results_Authorize

A function that determines who can access the MiniProfiler results url. It should return true when the request client has access, false for a 401 to be returned. HttpRequest parameter is the current request and MiniProfiler parameter is the results that were profiled.

View Source
Declaration
public static Func<IRequest, MiniProfiler, bool> Results_Authorize { get; set; }

Methods

LoadVersionFromAssembly()

View Source
Declaration
public static void LoadVersionFromAssembly()

ExcludeAssembly(String)

Excludes the specified assembly from the stack trace output.

View Source
Declaration
public static void ExcludeAssembly(string assemblyName)
Parameters
TypeNameDescription
System.StringassemblyNameThe short name of the assembly. AssemblyName.Name

|

ExcludeType(String)

Excludes the specified type from the stack trace output.

View Source
Declaration
public static void ExcludeType(string typeToExclude)
Parameters
TypeNameDescription
System.StringtypeToExcludeThe System.Type name to exclude

|

ExcludeMethod(String)

Excludes the specified method name from the stack trace output.

View Source
Declaration
public static void ExcludeMethod(string methodName)
Parameters
TypeNameDescription
System.StringmethodNameThe name of the method

|