API Guides > ConceptRT 3.x
TimeMeasurement Class Reference

Helper to measure a process time. More...

Detailed Description

Helper to measure a process time.

Provides Min, Max and AverageTime value of a time triggered by successive Start and Stop. This object can be published through dynamic invocation mechanism to monitor real-time behaviour of the execution or to measure part of execution in order to diagnostic where to optimize the code when necessary.

+ Inheritance diagram for TimeMeasurement:

Public Member Methods

const TimeSpanGetMaxTime () const
 The maximum time measured between Start and Stop. More...
 
const TimeSpanGetMaxTime ()
 The maximum time measured between Start and Stop. More...
 
const TimeSpanGetMinTime () const
 The minimum time measured between Start and Stop. More...
 
const TimeSpanGetMinTime ()
 The minimum time measured between Start and Stop. More...
 
const TimeSpanGetAverageTime () const
 The average time measured between Start and Stop. The value is filtered and evoluate slowly. More...
 
const TimeSpanGetAverageTime ()
 The average time measured between Start and Stop. The value is filtered and evoluate slowly. More...
 
const TimeSpanGetLastTime () const
 The last time measured between Start and Stop. More...
 
const TimeSpanGetLastTime ()
 The last time measured between Start and Stop. More...
 
const Int32GetMeasureCount () const
 The number of Start. More...
 
const Int32GetMeasureCount ()
 The number of Start. More...
 
 TimeMeasurement ()
 Default constructor. More...
 
void Start ()
 Start trigger of the cylce. More...
 
void Stop ()
 Stop trigger of the cylce. More...
 
void Reset ()
 Reset all measurement values. More...
 
void Invoke (const DynamicInvocationRequest &request, DynamicInvocationResult &result)
 Invokes the object fields and methods. More...
 

Protected Member Functions

void SetMaxTime (const TimeSpan &value)
 The maximum time measured between Start and Stop. More...
 
void SetMinTime (const TimeSpan &value)
 The minimum time measured between Start and Stop. More...
 
void SetAverageTime (const TimeSpan &value)
 The average time measured between Start and Stop. The value is filtered and evoluate slowly. More...
 
void SetLastTime (const TimeSpan &value)
 The last time measured between Start and Stop. More...
 
void SetMeasureCount (const Int32 &value)
 The number of Start. More...
 

Private fields

TimeSpan MaxTime
 The maximum time measured between Start and Stop. More...
 
TimeSpan MinTime
 The minimum time measured between Start and Stop. More...
 
TimeSpan AverageTime
 The average time measured between Start and Stop. The value is filtered and evoluate slowly. More...
 
TimeSpan LastTime
 The last time measured between Start and Stop. More...
 
Int32 MeasureCount
 The number of Start. More...
 

Constructor & Destructor Documentation

Default constructor.

Methods Documentation

const TimeSpan & GetAverageTime ( ) const
inline

The average time measured between Start and Stop. The value is filtered and evoluate slowly.

See also
Field: AverageTime
Returns
the property value
See also
Setter: SetAverageTime()
const TimeSpan & GetAverageTime ( )
inline

The average time measured between Start and Stop. The value is filtered and evoluate slowly.

See also
Field: AverageTime
Returns
the property value
See also
Setter: SetAverageTime()
const TimeSpan & GetLastTime ( ) const
inline

The last time measured between Start and Stop.

See also
Field: LastTime
Returns
the property value
See also
Setter: SetLastTime()
const TimeSpan & GetLastTime ( )
inline

The last time measured between Start and Stop.

See also
Field: LastTime
Returns
the property value
See also
Setter: SetLastTime()
const TimeSpan & GetMaxTime ( )
inline

The maximum time measured between Start and Stop.

See also
Field: MaxTime
Returns
the property value
See also
Setter: SetMaxTime()
const TimeSpan & GetMaxTime ( ) const
inline

The maximum time measured between Start and Stop.

See also
Field: MaxTime
Returns
the property value
See also
Setter: SetMaxTime()
const Int32 & GetMeasureCount ( ) const
inline

The number of Start.

Stop occurences.

Returns
the property value
See also
Field: MeasureCount
Setter: SetMeasureCount()
const Int32 & GetMeasureCount ( )
inline

The number of Start.

Stop occurences.

Returns
the property value
See also
Field: MeasureCount
Setter: SetMeasureCount()
const TimeSpan & GetMinTime ( ) const
inline

The minimum time measured between Start and Stop.

See also
Field: MinTime
Returns
the property value
See also
Setter: SetMinTime()
const TimeSpan & GetMinTime ( )
inline

The minimum time measured between Start and Stop.

See also
Field: MinTime
Returns
the property value
See also
Setter: SetMinTime()
void Invoke ( const DynamicInvocationRequest request,
DynamicInvocationResult result 
)
virtual

Invokes the object fields and methods.

Parameters
requestThe request.
result[in,out] The result.

Dynamic Invocation on IInvocable objects enables us to have remote access on published fields and methods.

Implements IInvocable.

void Reset ( )

Reset all measurement values.

void SetAverageTime ( const TimeSpan value)
inlineprotected

The average time measured between Start and Stop. The value is filtered and evoluate slowly.

Parameters
[in]valueThe new parameter value.
Returns
the property value
See also
Field: AverageTime
Getter: GetAverageTime()
void SetLastTime ( const TimeSpan value)
inlineprotected

The last time measured between Start and Stop.

Parameters
[in]valueThe new parameter value.
Returns
the property value
See also
Field: LastTime
Getter: GetLastTime()
void SetMaxTime ( const TimeSpan value)
inlineprotected

The maximum time measured between Start and Stop.

Parameters
[in]valueThe new parameter value.
Returns
the property value
See also
Field: MaxTime
Getter: GetMaxTime()
void SetMeasureCount ( const Int32 value)
inlineprotected

The number of Start.

Stop occurences.

Parameters
[in]valueThe new parameter value.
Returns
the property value
See also
Field: MeasureCount
Getter: GetMeasureCount()
void SetMinTime ( const TimeSpan value)
inlineprotected

The minimum time measured between Start and Stop.

Parameters
[in]valueThe new parameter value.
Returns
the property value
See also
Field: MinTime
Getter: GetMinTime()
void Start ( )

Start trigger of the cylce.

void Stop ( )

Stop trigger of the cylce.

Fields Documentation

TimeSpan AverageTime
private

The average time measured between Start and Stop. The value is filtered and evoluate slowly.

See also
Getter: GetAverageTime()
Setter: SetAverageTime()
TimeSpan LastTime
private

The last time measured between Start and Stop.

See also
Getter: GetLastTime()
Setter: SetLastTime()
TimeSpan MaxTime
private

The maximum time measured between Start and Stop.

See also
Getter: GetMaxTime()
Setter: SetMaxTime()
Int32 MeasureCount
private

The number of Start.

Stop occurences.

See also
Getter: GetMeasureCount()
Setter: SetMeasureCount()
TimeSpan MinTime
private

The minimum time measured between Start and Stop.

See also
Getter: GetMinTime()
Setter: SetMinTime()