Bitcoin Core 29.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
BCLog::LogRateLimiter::Stats Struct Reference

Keeps track of an individual source location and how many available bytes are left for logging from it. More...

#include <logging.h>

Public Member Functions

 Stats (uint64_t max_bytes)
 
bool Consume (uint64_t bytes)
 Updates internal accounting and returns true if enough available_bytes were remaining. More...
 

Public Attributes

uint64_t m_available_bytes
 Remaining bytes. More...
 
uint64_t m_dropped_bytes {0}
 Number of bytes that were consumed but didn't fit in the available bytes. More...
 

Detailed Description

Keeps track of an individual source location and how many available bytes are left for logging from it.

Definition at line 117 of file logging.h.

Constructor & Destructor Documentation

◆ Stats()

BCLog::LogRateLimiter::Stats::Stats ( uint64_t  max_bytes)
inline

Definition at line 123 of file logging.h.

Member Function Documentation

◆ Consume()

bool BCLog::LogRateLimiter::Stats::Consume ( uint64_t  bytes)

Updates internal accounting and returns true if enough available_bytes were remaining.

Definition at line 571 of file logging.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ m_available_bytes

uint64_t BCLog::LogRateLimiter::Stats::m_available_bytes

Remaining bytes.

Definition at line 119 of file logging.h.

◆ m_dropped_bytes

uint64_t BCLog::LogRateLimiter::Stats::m_dropped_bytes {0}

Number of bytes that were consumed but didn't fit in the available bytes.

Definition at line 121 of file logging.h.


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