Summary

A framework for recording elapsed time to perform a given task and to drive processing of the completed timers. The framework consists of two main classes: Timer and TimeTracker. Timer handles the recording of elapsed time and can be used in standalone mode or as part of TimeTracker framework.

Timer

A record of elapsed time. Timers can be used independently or as part of the framework driven using TimeTracker.

Provides:

  • Immediate or delayed start to allow preparation tasks to be excluded in the timing.
  • Nanosecond precision recording of tasks.
  • Basic completion logging in text or CSV format. Default is to not log.
  • Configurable log location with stdout being the default.
  • Status
  • Domain specific notes. A list of notes can be added to the timer that may provide information useful to analyzing the results at a later time. These notes will be appended to both the Text and CSV outputs if used.
Time Tracker

A framework for recording elapsed time to perform a given task and to drive processing of the completed timers.

Provides options to allow the recording process to be configured for low to high volume recording.

List

Can be configured to keep a list of all timers started via this class. This can be used when logging would cause too much overhead such as high volume recordings.

  • A snapshot of the results can be returned during the run.
  • The results may be cleared during the run. If the testing is done in batches, then the results can be processed and the list cleared between batches. This will reduce the memory requirements of the timer framework.
Logging

Logging can be enabled to direct the timers to log on completion. Logging can be directed to the console or a file. Current logging styles are text and csv.

Action Chain

Post processing of completed timers can be taken out of the processing thread by use of an ActionChain. The Action Chain provides a queue for processing a user provided chain of TimerActions that enable more complex processing of the timer data.

Configurable

Allows the creation of timers to be enabled/disabled during processing so that the timer logic can be left in place with very little overhead when disabled.