Class ServiceCallsRepositoryResourceLoggerContext
Actual resource logger context that is passed to SoTimer instances, and is called to record events.
Inherited Members
Namespace: SuperOffice.Diagnostics
Assembly: SoCore.dll
Syntax
public class ServiceCallsRepositoryResourceLoggerContext : ISoTimeRecorderContext, IDisposable
Remarks
Since it's only created for timers of type Database, we know that the Increment() method will only be called by the database functions. Thus, each instance of this class represents one database access, and each call to Increment represents one row read. This is rather indirect but on the other hand nicely flexible and extensible.
Properties
IsRunning
Actual resource logger context that is passed to SoTimer instances, and is called to record events.
Declaration
public bool IsRunning { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Since it's only created for timers of type Database, we know that the Increment() method will only be called by the database functions. Thus, each instance of this class represents one database access, and each call to Increment represents one row read. This is rather indirect but on the other hand nicely flexible and extensible.
Methods
Dispose()
Actual resource logger context that is passed to SoTimer instances, and is called to record events.
Declaration
public void Dispose()
Remarks
Since it's only created for timers of type Database, we know that the Increment() method will only be called by the database functions. Thus, each instance of this class represents one database access, and each call to Increment represents one row read. This is rather indirect but on the other hand nicely flexible and extensible.
End()
Stop the timer and obtain the time since the start of the timing.
Declaration
public void End()
Remarks
Since it's only created for timers of type Database, we know that the Increment() method will only be called by the database functions. Thus, each instance of this class represents one database access, and each call to Increment represents one row read. This is rather indirect but on the other hand nicely flexible and extensible.
Increment()
Increment the build in counter
Declaration
public void Increment()
Remarks
Since it's only created for timers of type Database, we know that the Increment() method will only be called by the database functions. Thus, each instance of this class represents one database access, and each call to Increment represents one row read. This is rather indirect but on the other hand nicely flexible and extensible.
Lap(Func<string>)
Lap method is called by the actual code doing things to indicate a sub-section of an operation
Declaration
public void Lap(Func<string> description)
Parameters
Type | Name | Description |
---|---|---|
Func<string> | description |
Remarks
We're currently not interested; Lap is useful if we want to separately time the various stages of a query. But because we collect aggregated info about /all/ the queries in a request, things like Time-To-First-Row don't really fit
Split(Func<string>)
Perform a split operation to see how long time was spent since the the timer was started.
Declaration
public void Split(Func<string> description)
Parameters
Type | Name | Description |
---|---|---|
Func<string> | description | Information about the split time. |
Remarks
Since it's only created for timers of type Database, we know that the Increment() method will only be called by the database functions. Thus, each instance of this class represents one database access, and each call to Increment represents one row read. This is rather indirect but on the other hand nicely flexible and extensible.