Skip to content
Snippets Groups Projects
Commit b6a21b5b authored by Philippe Canal's avatar Philippe Canal
Browse files

Add TBufferMerger::GetBuffered.

This can be used to monitor the queue size in bytes rather than number of files
parent abaa4766
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,9 @@ public:
/** Returns the number of buffers currently in the queue. */
size_t GetQueueSize() const;
/** Returns the number of bytes currently buffered (i.e. in the queue). */
size_t GetBuffered() const;
/** Returns the current value of the auto save setting in bytes (default = 0). */
size_t GetAutoSave() const;
......
......@@ -66,6 +66,12 @@ size_t TBufferMerger::GetQueueSize() const
return fQueue.size();
}
size_t TBufferMerger::GetBuffered() const
{
std::lock_guard<std::mutex> lock(fQueueMutex);
return fBuffered;
}
void TBufferMerger::Push(TBufferFile *buffer)
{
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment