mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +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 };
|
||||
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.emplace_back( 8.f * MbpsUpdateTime * bytes / ( td * 1000 * 1000 ) );
|
||||
t0 = t1;
|
||||
@ -267,10 +267,9 @@ void View::Draw()
|
||||
|
||||
void View::DrawImpl()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock( m_lock );
|
||||
|
||||
// Connection window
|
||||
{
|
||||
std::lock_guard<std::mutex> lock( m_mbpslock );
|
||||
const auto mbps = m_mbps.back();
|
||||
char buf[64];
|
||||
if( mbps < 0.1f )
|
||||
@ -285,6 +284,8 @@ void View::DrawImpl()
|
||||
ImGui::PlotLines( buf, m_mbps.data(), m_mbps.size(), 0, nullptr, 0 );
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock( m_lock );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,10 +58,12 @@ private:
|
||||
|
||||
// this block must be locked
|
||||
std::mutex m_lock;
|
||||
std::vector<float> m_mbps;
|
||||
Vector<Event*> m_timeline;
|
||||
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
|
||||
std::unordered_map<uint64_t, QueueZoneEnd> m_pendingEndZone;
|
||||
std::unordered_map<uint64_t, Event*> m_openZones;
|
||||
|
Loading…
Reference in New Issue
Block a user