mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Count transferred data size.
This commit is contained in:
parent
2d31ca993e
commit
1cfb5adc44
@ -2435,6 +2435,7 @@ void Worker::Exec()
|
||||
m_mbpsData.mbps.emplace_back( bytes / ( td * 125.f ) );
|
||||
m_mbpsData.compRatio = float( bytes ) / decBytes;
|
||||
m_mbpsData.queue = m_serverQueryQueue.size();
|
||||
m_mbpsData.transferred += bytes;
|
||||
t0 = t1;
|
||||
bytes = 0;
|
||||
decBytes = 0;
|
||||
|
@ -221,12 +221,13 @@ private:
|
||||
|
||||
struct MbpsBlock
|
||||
{
|
||||
MbpsBlock() : mbps( 64 ), compRatio( 1.0 ), queue( 0 ) {}
|
||||
MbpsBlock() : mbps( 64 ), compRatio( 1.0 ), queue( 0 ), transferred( 0 ) {}
|
||||
|
||||
std::shared_mutex lock;
|
||||
std::vector<float> mbps;
|
||||
float compRatio;
|
||||
size_t queue;
|
||||
uint64_t transferred;
|
||||
};
|
||||
|
||||
enum class NextCallstackType
|
||||
@ -375,6 +376,7 @@ public:
|
||||
const std::vector<float>& GetMbpsData() const { return m_mbpsData.mbps; }
|
||||
float GetCompRatio() const { return m_mbpsData.compRatio; }
|
||||
size_t GetSendQueueSize() const { return m_mbpsData.queue; }
|
||||
uint64_t GetDataTransferred() const { return m_mbpsData.transferred; }
|
||||
|
||||
bool HasData() const { return m_hasData.load( std::memory_order_acquire ); }
|
||||
bool IsConnected() const { return m_connected.load( std::memory_order_relaxed ); }
|
||||
|
Loading…
Reference in New Issue
Block a user