mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Merge pull request #6653 from yandex/speed-up-memory-tracker
Speed up MemoryTracker by function inlining
This commit is contained in:
commit
d0555d8eab
@ -51,12 +51,6 @@ MemoryTracker * CurrentThread::getMemoryTracker()
|
|||||||
return ¤t_thread->memory_tracker;
|
return ¤t_thread->memory_tracker;
|
||||||
}
|
}
|
||||||
|
|
||||||
Int64 & CurrentThread::getUntrackedMemory()
|
|
||||||
{
|
|
||||||
/// It assumes that (current_thread != nullptr) is already checked with getMemoryTracker()
|
|
||||||
return current_thread->untracked_memory;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CurrentThread::updateProgressIn(const Progress & value)
|
void CurrentThread::updateProgressIn(const Progress & value)
|
||||||
{
|
{
|
||||||
if (unlikely(!current_thread))
|
if (unlikely(!current_thread))
|
||||||
|
@ -52,7 +52,12 @@ public:
|
|||||||
|
|
||||||
static ProfileEvents::Counters & getProfileEvents();
|
static ProfileEvents::Counters & getProfileEvents();
|
||||||
static MemoryTracker * getMemoryTracker();
|
static MemoryTracker * getMemoryTracker();
|
||||||
static Int64 & getUntrackedMemory();
|
|
||||||
|
static inline Int64 & getUntrackedMemory()
|
||||||
|
{
|
||||||
|
/// It assumes that (current_thread != nullptr) is already checked with getMemoryTracker()
|
||||||
|
return current_thread->untracked_memory;
|
||||||
|
}
|
||||||
|
|
||||||
/// Update read and write rows (bytes) statistics (used in system.query_thread_log)
|
/// Update read and write rows (bytes) statistics (used in system.query_thread_log)
|
||||||
static void updateProgressIn(const Progress & value);
|
static void updateProgressIn(const Progress & value);
|
||||||
|
Loading…
Reference in New Issue
Block a user