mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Display number of in-flight queries.
This commit is contained in:
parent
089681267f
commit
51bae7855d
@ -658,6 +658,8 @@ void View::DrawNotificationArea()
|
||||
{
|
||||
auto& io = ImGui::GetIO();
|
||||
const auto ty = ImGui::GetFontSize();
|
||||
if( m_worker.IsConnected() )
|
||||
{
|
||||
const auto sqs = m_worker.GetSendQueueSize();
|
||||
if( sqs != 0 )
|
||||
{
|
||||
@ -670,6 +672,22 @@ void View::DrawNotificationArea()
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto sif = m_worker.GetSendInFlight();
|
||||
if( sif != 0 )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
TextColoredUnformatted( ImVec4( 1, 0.75f, 0, 1 ), ICON_FA_TACHOMETER_ALT );
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
TextFocused( "Queries in flight:", RealToString( sif ) );
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
auto& crash = m_worker.GetCrashEvent();
|
||||
if( crash.thread != 0 )
|
||||
{
|
||||
@ -872,6 +890,8 @@ bool View::DrawConnection()
|
||||
ImGui::Text( "%6.2f Mbps", mbps / m_worker.GetCompRatio() );
|
||||
TextFocused( "Data transferred:", MemSizeToString( m_worker.GetDataTransferred() ) );
|
||||
TextFocused( "Query backlog:", RealToString( m_worker.GetSendQueueSize() ) );
|
||||
ImGui::SameLine();
|
||||
TextFocused( "+", RealToString( m_worker.GetSendInFlight() ) );
|
||||
}
|
||||
|
||||
TextFocused( "Memory usage:", MemSizeToString( memUsage ) );
|
||||
|
@ -2717,7 +2717,7 @@ void Worker::Exec()
|
||||
}
|
||||
}
|
||||
|
||||
m_serverQuerySpaceLeft = ( m_sock.GetSendBufSize() / ServerQueryPacketSize ) - ServerQueryPacketSize; // leave space for terminate request
|
||||
m_serverQuerySpaceBase = m_serverQuerySpaceLeft = ( m_sock.GetSendBufSize() / ServerQueryPacketSize ) - ServerQueryPacketSize; // leave space for terminate request
|
||||
m_hasData.store( true, std::memory_order_release );
|
||||
|
||||
LZ4_setStreamDecode( (LZ4_streamDecode_t*)m_stream, nullptr, 0 );
|
||||
|
@ -495,6 +495,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; }
|
||||
size_t GetSendInFlight() const { return m_serverQuerySpaceBase - m_serverQuerySpaceLeft; }
|
||||
uint64_t GetDataTransferred() const { return m_mbpsData.transferred; }
|
||||
|
||||
bool HasData() const { return m_hasData.load( std::memory_order_acquire ); }
|
||||
@ -804,7 +805,7 @@ private:
|
||||
PlotData* m_sysTimePlot = nullptr;
|
||||
|
||||
Vector<ServerQueryPacket> m_serverQueryQueue;
|
||||
size_t m_serverQuerySpaceLeft;
|
||||
size_t m_serverQuerySpaceLeft, m_serverQuerySpaceBase;
|
||||
|
||||
unordered_flat_map<uint64_t, int32_t> m_frameImageStaging;
|
||||
char* m_frameImageBuffer = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user