Skip to main content

BaseProfilerProvider

BaseProfilerProvider. This providers some helper methods which provide access to internals not otherwise available. To use, override the ServiceStack.MiniProfiler.BaseProfilerProvider.Start(ServiceStack.MiniProfiler.ProfileLevel), ServiceStack.MiniProfiler.BaseProfilerProvider.Stop(System.Boolean) and ServiceStack.MiniProfiler.BaseProfilerProvider.GetCurrentProfiler() methods.

Assembly: ServiceStack.NetFramework.dll
View Source
Declaration
public abstract class BaseProfilerProvider : IProfilerProvider

Methods

Start(ProfileLevel)

Starts a new MiniProfiler and sets it to be current. By the end of this method ServiceStack.MiniProfiler.BaseProfilerProvider.GetCurrentProfiler() should return the new MiniProfiler.

View Source
Declaration
public abstract MiniProfiler Start(ProfileLevel level)
Returns

ServiceStack.MiniProfiler.MiniProfiler

Parameters
TypeName
ServiceStack.MiniProfiler.ProfileLevellevel

Stop(Boolean)

Stops the current MiniProfiler (if any is currently running). ServiceStack.MiniProfiler.BaseProfilerProvider.SaveProfiler(ServiceStack.MiniProfiler.MiniProfiler) should be called if <code data-dev-comment-type="paramref" class="paramref">discardResults</code> is false

View Source
Declaration
public abstract void Stop(bool discardResults)
Parameters
TypeNameDescription
System.BooleandiscardResultsIf true, any current results will be thrown away and nothing saved

|

GetCurrentProfiler()

Returns the current MiniProfiler. This is used by ServiceStack.MiniProfiler.MiniProfiler.Current.

View Source
Declaration
public abstract MiniProfiler GetCurrentProfiler()
Returns

ServiceStack.MiniProfiler.MiniProfiler

SetProfilerActive(MiniProfiler)

Sets <code data-dev-comment-type="paramref" class="paramref">profiler</code> to be active (read to start profiling) This should be called once a new MiniProfiler has been created.

View Source
Declaration
protected static void SetProfilerActive(MiniProfiler profiler)
Parameters
TypeNameDescription
ServiceStack.MiniProfiler.MiniProfilerprofilerThe profiler to set to active

|

StopProfiler(MiniProfiler)

Stops the profiler and marks it as inactive.

View Source
Declaration
protected static bool StopProfiler(MiniProfiler profiler)
Returns

System.Boolean: True if successful, false if Stop had previously been called on this profiler

Parameters
TypeNameDescription
ServiceStack.MiniProfiler.MiniProfilerprofilerThe profiler to stop

|

SaveProfiler(MiniProfiler)

Calls ServiceStack.MiniProfiler.MiniProfiler.Settings.EnsureStorageStrategy to save the current profiler using the current storage settings

View Source
Declaration
protected static void SaveProfiler(MiniProfiler current)
Parameters
TypeName
ServiceStack.MiniProfiler.MiniProfilercurrent

Implements