MySQL 8.0.39
Source Code Documentation
binlog::monitoring::Transaction_compression Class Reference

#include <context.h>

Public Member Functions

void update (log_type log_type, binary_log::transaction::compression::type comp_type, Gtid &gtid, uint64_t transaction_timestamp, uint64_t comp_bytes, uint64_t uncomp_bytes, Sid_map *sid_map=global_sid_map)
 Update this probe's stats. More...
 
void get_stats (std::vector< Compression_stats * > &stats)
 Gets the contents of the probe. More...
 
int number_stats_rows ()
 Gets the number of stats in the probe. More...
 
void reset ()
 Resets the stats of this probe to zero. More...
 
 Transaction_compression ()
 Constructor. More...
 
virtual ~Transaction_compression ()
 Destructor. More...
 

Protected Member Functions

void init ()
 Allocates this probe's internal structures. More...
 
void destroy ()
 Claims this probe's internal resources. More...
 

Protected Attributes

std::map< std::pair< log_type, binary_log::transaction::compression::type >, Compression_stats * > m_stats
 The map that contains rows of stats in the probe. More...
 

Constructor & Destructor Documentation

◆ Transaction_compression()

binlog::monitoring::Transaction_compression::Transaction_compression ( )

Constructor.

Transaction_compression -----------------------------------------—.

The constructed object is reset after this returns.

◆ ~Transaction_compression()

binlog::monitoring::Transaction_compression::~Transaction_compression ( )
virtual

Destructor.

Once the destructor returns the internal data structures have been destroyed.

Member Function Documentation

◆ destroy()

void binlog::monitoring::Transaction_compression::destroy ( )
protected

Claims this probe's internal resources.

◆ get_stats()

void binlog::monitoring::Transaction_compression::get_stats ( std::vector< Compression_stats * > &  stats)

Gets the contents of the probe.

The contents are a copy of the internal stats and as such, the caller must free the resources in stats once they are no longer needed.

Parameters
statsthe container to fill in with copies of the stats in the probe.

◆ init()

void binlog::monitoring::Transaction_compression::init ( )
protected

Allocates this probe's internal structures.

◆ number_stats_rows()

int binlog::monitoring::Transaction_compression::number_stats_rows ( )

Gets the number of stats in the probe.

Each combination of log_type and comp_type creates a row. Only those rows that have stats collected are considered.

Returns
the number of combinations between log_type and comp_type that have stats collected.

◆ reset()

void binlog::monitoring::Transaction_compression::reset ( )

Resets the stats of this probe to zero.

◆ update()

void binlog::monitoring::Transaction_compression::update ( log_type  log_type,
binary_log::transaction::compression::type  comp_type,
Gtid gtid,
uint64_t  transaction_timestamp,
uint64_t  comp_bytes,
uint64_t  uncomp_bytes,
Sid_map sid_map = global_sid_map 
)

Update this probe's stats.

Parameters
log_typethe type of the log that this invocation refers to.
comp_typethe compression type for this invocation.
gtidthe transaction identifier for this invocation.
transaction_timestampthe transaction commit timestamp in seconds since the UNIX epoch.
comp_bytesthe bytes compressed by this transaction.
uncomp_bytesthe bytes uncompressed by this transaction.
sid_mapthe Sid_map to use to create a string representation from the transaction identifier provided.

Member Data Documentation

◆ m_stats

std::map<std::pair<log_type, binary_log::transaction::compression::type>, Compression_stats *> binlog::monitoring::Transaction_compression::m_stats
protected

The map that contains rows of stats in the probe.

A stats row is a combination of log type and compression type.


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