32#ifndef CLONE_MONITOR_H
33#define CLONE_MONITOR_H
95 uint64_t ret_estimate = 0;
100 return (ret_estimate);
176 bytes_left = size - aligned_size;
Class used to report CLONE progress via Performance Schema.
Definition: clone0monitor.h:45
@ NOT_STARTED
Definition: clone0monitor.h:197
@ COMPLETE_WORK
Definition: clone0monitor.h:197
@ ESTIMATE_WORK
Definition: clone0monitor.h:197
void change_phase()
Change from one phase to the other.
Definition: clone0monitor.h:135
~Clone_Monitor()
Destructor.
Definition: clone0monitor.h:59
enum Clone_Monitor::@187 m_cur_phase
void update_work(uint size)
Update the progress of the clone operation.
Definition: clone0monitor.h:122
uint64_t m_estimate_bytes_left
Definition: clone0monitor.h:191
void add_estimate(uint64_t size)
Update the work estimated for the clone operation.
Definition: clone0monitor.h:106
uint64_t m_work_done
Definition: clone0monitor.h:185
bool is_estimation_phase() const
Definition: clone0monitor.h:91
void init_state(PSI_stage_key key, bool enable)
Initialize all monitoring data.
Definition: clone0monitor.h:70
uint64_t m_estimate
Definition: clone0monitor.h:182
uint64_t m_work_bytes_left
Definition: clone0monitor.h:194
PSI_stage_progress * m_progress
Definition: clone0monitor.h:188
uint64_t get_estimate()
Definition: clone0monitor.h:94
Clone_Monitor()
Constructor.
Definition: clone0monitor.h:48
uint64_t convert_bytes_to_work(uint64_t size, bool is_estimate)
Translate bytes to work unit.
Definition: clone0monitor.h:171
static const int PFS_DATA_CHUNK_SIZE_POW2
Definition: clone0monitor.h:200
uint m_pfs_data_chunk_size
Definition: clone0monitor.h:203
std::function< int()> Clone_Alert_Func
Function to alert caller for long wait.
Definition: clone0monitor.h:42
unsigned int PSI_stage_key
Instrumented stage key.
Definition: psi_stage_bits.h:42
#define mysql_set_stage(K)
Set the current stage.
Definition: mysql_stage.h:79
#define mysql_end_stage
End the last stage.
Definition: mysql_stage.h:85
#define mysql_stage_set_work_completed(P1, P2)
Definition: mysql_stage.h:114
#define mysql_stage_set_work_estimated(P1, P2)
Definition: mysql_stage.h:139
Instrumentation helpers for stages.
required string key
Definition: replication_asynchronous_connection_failover.proto:59
Interface for an instrumented stage progress.
Definition: psi_stage_bits.h:62
unsigned int uint
Definition: uca-dump.cc:29
Version control for database, common definitions, and include files.
static uint64_t ut_uint64_align_down(uint64_t n, ulint align_no)
Rounds a 64-bit integer downward to a multiple of a power of 2.
Debug utilities for Innobase.
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:68
static uint32_t ut_2_exp(uint32_t n)
Calculates 2 to power n.
#define PSI_NOT_INSTRUMENTED
Definition: validate_password_imp.cc:39