mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-23 01:00:54 +00:00
Fix empty rate sample list read in the progress line.
HasData() flips when the connection is established, but the rate list is only filled by the worker periodic stats update, whose first entry arrives ~200ms later, so the first render could read an empty list.
This commit is contained in:
@@ -166,7 +166,13 @@ void PrintCaptureProgress( tracy::Worker& worker, int64_t firstTime, int64_t mem
|
||||
|
||||
auto& lock = worker.GetMbpsDataLock();
|
||||
lock.lock();
|
||||
const auto mbps = worker.GetMbpsData().back();
|
||||
const auto& mbpsData = worker.GetMbpsData();
|
||||
if( mbpsData.empty() )
|
||||
{
|
||||
lock.unlock();
|
||||
return;
|
||||
}
|
||||
const auto mbps = mbpsData.back();
|
||||
const auto compRatio = worker.GetCompRatio();
|
||||
const auto netTotal = worker.GetDataTransferred();
|
||||
const auto queueSize = worker.GetSendQueueSize();
|
||||
|
||||
Reference in New Issue
Block a user