mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-12 19:31:47 +00:00
Throughput data is not related to event data.
This commit is contained in:
parent
2947fb6563
commit
19f67504b1
@ -106,7 +106,7 @@ void View::Worker()
|
|||||||
enum { MbpsUpdateTime = 200 };
|
enum { MbpsUpdateTime = 200 };
|
||||||
if( td > MbpsUpdateTime )
|
if( td > MbpsUpdateTime )
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock( m_lock );
|
std::lock_guard<std::mutex> lock( m_mbpslock );
|
||||||
m_mbps.erase( m_mbps.begin() );
|
m_mbps.erase( m_mbps.begin() );
|
||||||
m_mbps.emplace_back( 8.f * MbpsUpdateTime * bytes / ( td * 1000 * 1000 ) );
|
m_mbps.emplace_back( 8.f * MbpsUpdateTime * bytes / ( td * 1000 * 1000 ) );
|
||||||
t0 = t1;
|
t0 = t1;
|
||||||
@ -267,10 +267,9 @@ void View::Draw()
|
|||||||
|
|
||||||
void View::DrawImpl()
|
void View::DrawImpl()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock( m_lock );
|
|
||||||
|
|
||||||
// Connection window
|
// Connection window
|
||||||
{
|
{
|
||||||
|
std::lock_guard<std::mutex> lock( m_mbpslock );
|
||||||
const auto mbps = m_mbps.back();
|
const auto mbps = m_mbps.back();
|
||||||
char buf[64];
|
char buf[64];
|
||||||
if( mbps < 0.1f )
|
if( mbps < 0.1f )
|
||||||
@ -285,6 +284,8 @@ void View::DrawImpl()
|
|||||||
ImGui::PlotLines( buf, m_mbps.data(), m_mbps.size(), 0, nullptr, 0 );
|
ImGui::PlotLines( buf, m_mbps.data(), m_mbps.size(), 0, nullptr, 0 );
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::lock_guard<std::mutex> lock( m_lock );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -58,10 +58,12 @@ private:
|
|||||||
|
|
||||||
// this block must be locked
|
// this block must be locked
|
||||||
std::mutex m_lock;
|
std::mutex m_lock;
|
||||||
std::vector<float> m_mbps;
|
|
||||||
Vector<Event*> m_timeline;
|
Vector<Event*> m_timeline;
|
||||||
std::unordered_map<uint64_t, std::string> m_strings;
|
std::unordered_map<uint64_t, std::string> m_strings;
|
||||||
|
|
||||||
|
std::mutex m_mbpslock;
|
||||||
|
std::vector<float> m_mbps;
|
||||||
|
|
||||||
// not used for vis - no need to lock
|
// not used for vis - no need to lock
|
||||||
std::unordered_map<uint64_t, QueueZoneEnd> m_pendingEndZone;
|
std::unordered_map<uint64_t, QueueZoneEnd> m_pendingEndZone;
|
||||||
std::unordered_map<uint64_t, Event*> m_openZones;
|
std::unordered_map<uint64_t, Event*> m_openZones;
|
||||||
|
Loading…
Reference in New Issue
Block a user