Print info in texture console about curl request queuing
This includes also non-texture requests (not sure if it's worth it to explicitely separate this data for just textures). The texture console now prints: HTTP:c/q/a/r Where, c = number of 'add' request commands in the command queue (minus the number of 'remove' request in the command queue and not taking into account the command_being_processed, nor entirely being thread-safe with regard to adding requests to 'q' or 'a' next: it is possible that a request is no longer counted in 'c' but not yet is added to 'q' or 'a'. q = number of queued (throttled) requests (by the curl thread). a = number of actually added requests (to the multi handle). r = last returned value of 'running handles' by libcurl. Obviously, c and q should be small (0 or 1) most of the time and a and r should be equal and maxed out. This turns out to be the case.
This commit is contained in:
@@ -186,6 +186,15 @@ void setCAFile(std::string const& file);
|
|||||||
// Can be used to set the path to the Certificate Authority file.
|
// Can be used to set the path to the Certificate Authority file.
|
||||||
void setCAPath(std::string const& file);
|
void setCAPath(std::string const& file);
|
||||||
|
|
||||||
|
// Returns number of queued 'add' commands minus the number of queued 'remove' commands.
|
||||||
|
U32 getNumHTTPCommands(void);
|
||||||
|
|
||||||
|
// Returns the number of queued requests.
|
||||||
|
U32 getNumHTTPQueued(void);
|
||||||
|
|
||||||
|
// Returns the number of curl requests currently added to the multi handle.
|
||||||
|
U32 getNumHTTPAdded(void);
|
||||||
|
|
||||||
// This used to be LLAppViewer::getTextureFetch()->getNumHTTPRequests().
|
// This used to be LLAppViewer::getTextureFetch()->getNumHTTPRequests().
|
||||||
// Returns the number of active curl easy handles (that are actually attempting to download something).
|
// Returns the number of active curl easy handles (that are actually attempting to download something).
|
||||||
U32 getNumHTTPRunning(void);
|
U32 getNumHTTPRunning(void);
|
||||||
|
|||||||
@@ -2505,5 +2505,23 @@ bool handleNoVerifySSLCert(LLSD const& newvalue)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
U32 getNumHTTPCommands(void)
|
||||||
|
{
|
||||||
|
using namespace AICurlPrivate;
|
||||||
|
|
||||||
|
command_queue_rat command_queue_r(command_queue);
|
||||||
|
return command_queue_r->size;
|
||||||
|
}
|
||||||
|
|
||||||
|
U32 getNumHTTPQueued(void)
|
||||||
|
{
|
||||||
|
return AIPerHostRequestQueue::total_queued_size();
|
||||||
|
}
|
||||||
|
|
||||||
|
U32 getNumHTTPAdded(void)
|
||||||
|
{
|
||||||
|
return AICurlPrivate::curlthread::MultiHandle::total_added_size();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace AICurlInterface
|
} // namespace AICurlInterface
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,9 @@ std::set<LLViewerFetchedTexture*> LLTextureView::sDebugImages;
|
|||||||
|
|
||||||
// Forward declaration.
|
// Forward declaration.
|
||||||
namespace AICurlInterface {
|
namespace AICurlInterface {
|
||||||
|
U32 getNumHTTPCommands(void);
|
||||||
|
U32 getNumHTTPQueued(void);
|
||||||
|
U32 getNumHTTPAdded(void);
|
||||||
U32 getNumHTTPRunning(void);
|
U32 getNumHTTPRunning(void);
|
||||||
} // namespace AICurlInterface
|
} // namespace AICurlInterface
|
||||||
|
|
||||||
@@ -598,7 +601,7 @@ void LLGLTexMemBar::draw()
|
|||||||
#endif
|
#endif
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d RAW:%d(%d) HTP:%d DEC:%d CRE:%d ",
|
text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d RAW:%d(%d) HTTP:%d/%d/%d/%d DEC:%d CRE:%d ",
|
||||||
gTextureList.getNumImages(),
|
gTextureList.getNumImages(),
|
||||||
LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(),
|
LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(),
|
||||||
LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount,
|
LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount,
|
||||||
@@ -606,6 +609,9 @@ void LLGLTexMemBar::draw()
|
|||||||
LLLFSThread::sLocal->getPending(),
|
LLLFSThread::sLocal->getPending(),
|
||||||
LLAppViewer::getImageDecodeThread()->getPending(),
|
LLAppViewer::getImageDecodeThread()->getPending(),
|
||||||
LLImageRaw::sRawImageCount, LLImageRaw::sRawImageCachedCount,
|
LLImageRaw::sRawImageCount, LLImageRaw::sRawImageCachedCount,
|
||||||
|
AICurlInterface::getNumHTTPCommands(),
|
||||||
|
AICurlInterface::getNumHTTPQueued(),
|
||||||
|
AICurlInterface::getNumHTTPAdded(),
|
||||||
AICurlInterface::getNumHTTPRunning(),
|
AICurlInterface::getNumHTTPRunning(),
|
||||||
LLAppViewer::getImageDecodeThread()->getPending(),
|
LLAppViewer::getImageDecodeThread()->getPending(),
|
||||||
gTextureList.mCreateTextureList.size());
|
gTextureList.mCreateTextureList.size());
|
||||||
|
|||||||
Reference in New Issue
Block a user