I have a need that allows me to look at the duration of outages from historical outage data generated by my advanced log database.
With the current set of macro variables, each time an entry is made into the database (using logs set to fire only upon status changes) the %StatusChangedTime% is the same time as the %DateTime% variable. This is since the current test timestamp is also the last time the status changed, so it is the same time.
So there is no timestamp associated with the previous statuschange (i.e. outage).
I would like to have an entry that looks like:
TestName - current date/time - last status date/time
based upon a single SQL Insert statement using the advanced logs option.
Would it be possible to have another macro variable that holds the timestamp associated with the %lastStatus%?
I think we can add 2 new variables:
- %PreviousStatusDuration% - represent time interval in "[xx days] hh:mm:ss" format (e.g. "2 days 05:20:47")
- %PreviousStatusDuration_Sec% - display number of seconds (e.g. "7200")
What do you think?