Show / Hide Table of Contents

Class ServiceCallsRepositoryResourceLoggerContext

Actual resource logger context that is passed to SoTimer instances, and is called to record events.

Inheritance
object
ServiceCallsRepositoryResourceLoggerContext
Implements
ISoTimeRecorderContext
IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
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.

Implements

ISoTimeRecorderContext
IDisposable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top