Bug #69881 Expose current timer values in P_S
Submitted: 31 Jul 2013 17:11
Reporter: Todd Farmer (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S4 (Feature request)
Version:5.6.11 OS:Any
Assigned to: Marc Alff CPU Architecture:Any

[31 Jul 2013 17:11] Todd Farmer
Description:
Per design, the EVENTS_WAITS_CURRENT table shows NULL values for TIMER_WAIT when the event has not finished.  However, the use of an internal timer makes it impossible to calculate the elapsed time for incomplete events.  To facilitate this, we should have something like a PS_TIMER_IN_PICOSECONDS() - and similar for other timers.  Or we should extend the PERFORMANCE_TIMERS table with a CURRENT_TIMER_VALUE column.

How to repeat:
See above.  Try to compute elapsed time for an event which has not completed.

Suggested fix:
Either:

1.  Create functions such as PS_TIMER_IN_PICOSECONDS()
2.  Add a CURRENT_TIMER_VALUE column to the PERFORMANCE_TIMERS table.
[3 Jun 2015 16:57] Simon Mudd
Add the new function as people may do "odd things" with P_S and therefore want to calculate things you haven't thought of yet. So having the constant visible as a function means we can do whatever we want even if the P_S tables don't change.