MySQL 8.0.40
Source Code Documentation
|
This class is used in implementing the 'EXPLAIN ANALYZE' command. More...
#include <timing_iterator.h>
Public Types | |
using | steady_clock = std::chrono::steady_clock |
using | duration = steady_clock::time_point::duration |
using | TimeStamp = steady_clock::time_point |
Public Member Functions | |
double | GetFirstRowMs () const override |
Time (in ms) spent fetching the first row. More... | |
double | GetLastRowMs () const override |
Time (in ms) spent fetching the remaining rows. More... | |
uint64_t | GetNumInitCalls () const override |
The number of loops (i.e number of iterator->Init() calls. More... | |
uint64_t | GetNumRows () const override |
The number of rows fetched. More... | |
void | StopInit (TimeStamp start_time) |
Mark the end of an iterator->Init() call. More... | |
void | IncrementNumRows (uint64_t materialized_rows) |
Update the number of rows read. More... | |
void | StopRead (TimeStamp start_time, bool read_ok) |
Mark the end of an iterator->Read() call. More... | |
Public Member Functions inherited from IteratorProfiler | |
virtual | ~IteratorProfiler ()=default |
Static Public Member Functions | |
static TimeStamp | Now () |
Return current time. More... | |
Static Private Member Functions | |
static double | DurationToMs (duration dur) |
Private Attributes | |
uint64_t | m_num_init_calls {0} |
The number of loops. More... | |
uint64_t | m_num_rows {0} |
The number of rows fetched. More... | |
bool | m_first_row |
True if we are about to read the first row. More... | |
duration | m_elapsed_first_row {0} |
Elapsed time in all calls to m_iterator.Init() and Read() for the first row. More... | |
duration | m_elapsed_other_rows {0} |
Elapsed time in all calls to m_iterator.Read() for all but the first row. More... | |
This class is used in implementing the 'EXPLAIN ANALYZE' command.
It maintains a set of profiling data.
using IteratorProfilerImpl::duration = steady_clock::time_point::duration |
using IteratorProfilerImpl::steady_clock = std::chrono::steady_clock |
using IteratorProfilerImpl::TimeStamp = steady_clock::time_point |
|
inlinestaticprivate |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
The number of loops (i.e number of iterator->Init() calls.
Implements IteratorProfiler.
|
inlineoverridevirtual |
|
inline |
Update the number of rows read.
Note that this function is only called for iterator where we read all rows during iterator->Init() (
|
inlinestatic |
Return current time.
|
inline |
Mark the end of an iterator->Init() call.
|
inline |
Mark the end of an iterator->Read() call.
start_time | time when Read() started. |
read_ok | 'true' if Read() was successful. |
|
private |
Elapsed time in all calls to m_iterator.Init() and Read() for the first row.
|
private |
Elapsed time in all calls to m_iterator.Read() for all but the first row.
|
private |
True if we are about to read the first row.
|
private |
The number of loops.
|
private |
The number of rows fetched.
(Sum for all loops.)