MySQL 9.1.0
Source Code Documentation
Clone_Monitor Class Reference

Class used to report CLONE progress via Performance Schema. More...

#include <clone0monitor.h>

Public Member Functions

 Clone_Monitor ()
 Constructor. More...
 
 ~Clone_Monitor ()
 Destructor. More...
 
void init_state (PSI_stage_key key, bool enable)
 Initialize all monitoring data. More...
 
bool is_estimation_phase () const
 
uint64_t get_estimate ()
 
void add_estimate (uint64_t size)
 Update the work estimated for the clone operation. More...
 
void update_work (uint size)
 Update the progress of the clone operation. More...
 
void change_phase ()
 Change from one phase to the other. More...
 

Private Types

enum  { NOT_STARTED = 0 , ESTIMATE_WORK , COMPLETE_WORK }
 

Private Member Functions

uint64_t convert_bytes_to_work (uint64_t size, bool is_estimate)
 Translate bytes to work unit. More...
 

Private Attributes

uint64_t m_estimate
 
uint64_t m_work_done
 
PSI_stage_progressm_progress
 
uint64_t m_estimate_bytes_left
 
uint64_t m_work_bytes_left
 
enum Clone_Monitor:: { ... }  m_cur_phase
 
uint m_pfs_data_chunk_size
 

Static Private Attributes

static const int PFS_DATA_CHUNK_SIZE_POW2 = 20
 

Detailed Description

Class used to report CLONE progress via Performance Schema.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
NOT_STARTED 
ESTIMATE_WORK 
COMPLETE_WORK 

Constructor & Destructor Documentation

◆ Clone_Monitor()

Clone_Monitor::Clone_Monitor ( )
inline

Constructor.

◆ ~Clone_Monitor()

Clone_Monitor::~Clone_Monitor ( )
inline

Destructor.

Member Function Documentation

◆ add_estimate()

void Clone_Monitor::add_estimate ( uint64_t  size)
inline

Update the work estimated for the clone operation.

Parameters
[in]sizesize in bytes that needs to transferred across.

◆ change_phase()

void Clone_Monitor::change_phase ( )
inline

Change from one phase to the other.

◆ convert_bytes_to_work()

uint64_t Clone_Monitor::convert_bytes_to_work ( uint64_t  size,
bool  is_estimate 
)
inlineprivate

Translate bytes to work unit.

Parameters
[in]sizesize in bytes that needs to be converted to the
[in]is_estimateif called during estimation corresponding work unit.
Returns
the number of PFS chunks that the size constitutes.

◆ get_estimate()

uint64_t Clone_Monitor::get_estimate ( )
inline
Returns
estimated work in bytes

◆ init_state()

void Clone_Monitor::init_state ( PSI_stage_key  key,
bool  enable 
)
inline

Initialize all monitoring data.

Parameters
[in]keyPFS key to register stage event
[in]enableif true, enable PFS trackig.

◆ is_estimation_phase()

bool Clone_Monitor::is_estimation_phase ( ) const
inline
Returns
true if in estimation phase

◆ update_work()

void Clone_Monitor::update_work ( uint  size)
inline

Update the progress of the clone operation.

param[in] size size in bytes that is being transferred across.

Member Data Documentation

◆ 

enum { ... } Clone_Monitor::m_cur_phase

◆ m_estimate

uint64_t Clone_Monitor::m_estimate
private

◆ m_estimate_bytes_left

uint64_t Clone_Monitor::m_estimate_bytes_left
private

◆ m_pfs_data_chunk_size

uint Clone_Monitor::m_pfs_data_chunk_size
private

◆ m_progress

PSI_stage_progress* Clone_Monitor::m_progress
private

◆ m_work_bytes_left

uint64_t Clone_Monitor::m_work_bytes_left
private

◆ m_work_done

uint64_t Clone_Monitor::m_work_done
private

◆ PFS_DATA_CHUNK_SIZE_POW2

const int Clone_Monitor::PFS_DATA_CHUNK_SIZE_POW2 = 20
staticprivate

The documentation for this class was generated from the following file: