Click or drag to resize

TimerLogger Class

Creates a simple way to log a timer message to the devlog. The logger writes bracketing start and stop entries in the devlog. The two entries are tied together with a bracketingID that can be used to identify a particular entry's matching entry via the F8 key. Entries are logged with Info severity unless a Warning threshold is provided in the Stop(String, Double) call.

In order to avoid cluttering up the devlog, it is sometimes desirable to write a timer entry if, and only if, some timing threshold is exceeded. Use the ThresholdLogger for this purpose.

Inheritance Hierarchy
SystemObject
  NetQuarryTimerLogger

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public sealed class TimerLogger

The TimerLogger type exposes the following members.

Constructors
  NameDescription
Public methodTimerLogger(String)
Creates the object and logs the start message.
Public methodTimerLogger(String, String)
Creates the object with a specific logID.
Public methodTimerLogger(String, String, LogCategory)
Creates the timer object with a specific logID and logCategory
Public methodTimerLogger(String, String, String)
Creates the object with a specific logID.
Public methodTimerLogger(String, String, LogCategory, String)
Creates the timer object with a specific logID, logCategory, and source.
Top
Properties
  NameDescription
Public propertyStartTime
Gets the start time for the timer.
Public propertyStartTimestamp
Gets the start timestamp (as written to devlog) for the timer.
Public propertyStopTime
Gets the stop time for the timer. Valid only if Stop has been called.
Public propertyStopTimestamp
Gets the stop timestamp (as written to devlog) for the timer. Valid only if Stop has been called.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStop
Stops the timer and logs the closing message.
Public methodStop(String)
Stops the timer and logs the closing message with the provided addendum.
Public methodStop(String, Double)
Stops the timer and logs the closing message with the provided addendum. If the timer met or exceeded the specified threshold then the entry is logged as a Warning rather than as Info.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic memberTIMER_SOURCE
Default source for timer log messages
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also