MAINT-7343 - added periodic logging of state of the asset store.
parent
e6f53dedb7
commit
b7b8d6e1ae
|
|
@ -31,9 +31,6 @@
|
|||
#include "llmemory.h"
|
||||
#include "llsingleton.h"
|
||||
|
||||
#include <set>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLAssetType
|
||||
///----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -253,6 +253,8 @@ public:
|
|||
bool user_waiting= false,
|
||||
F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT) = 0;
|
||||
|
||||
virtual void logAssetStorageInfo() = 0;
|
||||
|
||||
void checkForTimeouts();
|
||||
|
||||
void getEstateAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id,
|
||||
|
|
|
|||
|
|
@ -14639,6 +14639,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AssetStorageLogFrequency</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Seconds between display of AssetStorage info in log (0 for never)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>60.0</real>
|
||||
</map>
|
||||
<key>LogWearableAssetSave</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -1428,7 +1428,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
|||
F64 byte_count = 0;
|
||||
for (S32 i=mFirstPacket; i<=mLastPacket; i++)
|
||||
{
|
||||
byte_count += mPackets[i]->mSize;
|
||||
if (mPackets[i])
|
||||
{
|
||||
byte_count += mPackets[i]->mSize;
|
||||
}
|
||||
}
|
||||
|
||||
LL_DEBUGS(LOG_TXT) << mID << ": Loaded from Sim. Bytes: " << mFormattedImage->getDataSize() << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -99,17 +99,30 @@ public:
|
|||
/// LLViewerAssetStorage
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
// Unused?
|
||||
LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
|
||||
LLVFS *vfs, LLVFS *static_vfs,
|
||||
const LLHost &upstream_host)
|
||||
: LLAssetStorage(msg, xfer, vfs, static_vfs, upstream_host)
|
||||
: LLAssetStorage(msg, xfer, vfs, static_vfs, upstream_host),
|
||||
mAssetCoroCount(0),
|
||||
mCountRequests(0),
|
||||
mCountStarted(0),
|
||||
mCountCompleted(0),
|
||||
mCountSucceeded(0),
|
||||
mTotalBytesFetched(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
|
||||
LLVFS *vfs, LLVFS *static_vfs)
|
||||
: LLAssetStorage(msg, xfer, vfs, static_vfs)
|
||||
: LLAssetStorage(msg, xfer, vfs, static_vfs),
|
||||
mAssetCoroCount(0),
|
||||
mCountRequests(0),
|
||||
mCountStarted(0),
|
||||
mCountCompleted(0),
|
||||
mCountSucceeded(0),
|
||||
mTotalBytesFetched(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -351,6 +364,7 @@ void LLViewerAssetStorage::_queueDataRequest(
|
|||
BOOL duplicate,
|
||||
BOOL is_priority)
|
||||
{
|
||||
mCountRequests++;
|
||||
queueRequestHttp(uuid, atype, callback, user_data, duplicate, is_priority);
|
||||
}
|
||||
|
||||
|
|
@ -404,6 +418,20 @@ void LLViewerAssetStorage::capsRecvForRegion(const LLUUID& region_id, std::strin
|
|||
LLEventPumps::instance().obtain(pumpname).post(LLSD());
|
||||
}
|
||||
|
||||
struct LLScopedIncrement
|
||||
{
|
||||
LLScopedIncrement(S32& counter):
|
||||
mCounter(counter)
|
||||
{
|
||||
++mCounter;
|
||||
}
|
||||
~LLScopedIncrement()
|
||||
{
|
||||
--mCounter;
|
||||
}
|
||||
S32& mCounter;
|
||||
};
|
||||
|
||||
void LLViewerAssetStorage::assetRequestCoro(
|
||||
LLViewerAssetRequest *req,
|
||||
const LLUUID& uuid,
|
||||
|
|
@ -411,6 +439,9 @@ void LLViewerAssetStorage::assetRequestCoro(
|
|||
LLGetAssetCallback callback,
|
||||
void *user_data)
|
||||
{
|
||||
LLScopedIncrement coro_count_boost(mAssetCoroCount);
|
||||
mCountStarted++;
|
||||
|
||||
S32 result_code = LL_ERR_NOERR;
|
||||
LLExtStat ext_status = LL_EXSTAT_NONE;
|
||||
|
||||
|
|
@ -463,6 +494,8 @@ void LLViewerAssetStorage::assetRequestCoro(
|
|||
// Bail out if result arrives after shutdown has been started.
|
||||
return;
|
||||
}
|
||||
|
||||
mCountCompleted++;
|
||||
|
||||
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
|
||||
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
|
||||
|
|
@ -481,6 +514,8 @@ void LLViewerAssetStorage::assetRequestCoro(
|
|||
S32 size = raw.size();
|
||||
if (size > 0)
|
||||
{
|
||||
mTotalBytesFetched += size;
|
||||
|
||||
// This create-then-rename flow is modeled on
|
||||
// LLTransferTargetVFile, which is what was used in the UDP
|
||||
// case.
|
||||
|
|
@ -502,6 +537,7 @@ void LLViewerAssetStorage::assetRequestCoro(
|
|||
result_code = LL_ERR_ASSET_REQUEST_FAILED;
|
||||
ext_status = LL_EXSTAT_VFS_CORRUPT;
|
||||
}
|
||||
mCountSucceeded++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -522,3 +558,14 @@ std::string LLViewerAssetStorage::getAssetURL(const std::string& cap_url, const
|
|||
std::string url = cap_url + "/?" + type_name + "_id=" + uuid.asString();
|
||||
return url;
|
||||
}
|
||||
|
||||
void LLViewerAssetStorage::logAssetStorageInfo()
|
||||
{
|
||||
LLMemory::logMemoryInfo(true);
|
||||
LL_INFOS("AssetStorage") << "Active coros " << mAssetCoroCount << LL_ENDL;
|
||||
LL_INFOS("AssetStorage") << "mPendingDownloads size " << mPendingDownloads.size() << LL_ENDL;
|
||||
LL_INFOS("AssetStorage") << "mCountStarted " << mCountStarted << LL_ENDL;
|
||||
LL_INFOS("AssetStorage") << "mCountCompleted " << mCountCompleted << LL_ENDL;
|
||||
LL_INFOS("AssetStorage") << "mCountSucceeded " << mCountSucceeded << LL_ENDL;
|
||||
LL_INFOS("AssetStorage") << "mTotalBytesFetched " << mTotalBytesFetched << LL_ENDL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,15 @@ protected:
|
|||
|
||||
std::string getAssetURL(const std::string& cap_url, const LLUUID& uuid, LLAssetType::EType atype);
|
||||
|
||||
void logAssetStorageInfo();
|
||||
|
||||
std::string mViewerAssetUrl;
|
||||
S32 mAssetCoroCount;
|
||||
S32 mCountRequests;
|
||||
S32 mCountStarted;
|
||||
S32 mCountCompleted;
|
||||
S32 mCountSucceeded;
|
||||
S64 mTotalBytesFetched;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ const F32 TELEPORT_EXPIRY_PER_ATTACHMENT = 3.f;
|
|||
U32 gRecentFrameCount = 0; // number of 'recent' frames
|
||||
LLFrameTimer gRecentFPSTime;
|
||||
LLFrameTimer gRecentMemoryTime;
|
||||
LLFrameTimer gAssetStorageLogTime;
|
||||
|
||||
// Rendering stuff
|
||||
void pre_show_depth_buffer();
|
||||
|
|
@ -226,6 +227,12 @@ void display_stats()
|
|||
LLMemory::logMemoryInfo(TRUE) ;
|
||||
gRecentMemoryTime.reset();
|
||||
}
|
||||
F32 asset_storage_log_freq = gSavedSettings.getF32("AssetStorageLogFrequency");
|
||||
if (asset_storage_log_freq > 0.f && gAssetStorageLogTime.getElapsedTimeF32() >= asset_storage_log_freq)
|
||||
{
|
||||
gAssetStorageLogTime.reset();
|
||||
gAssetStorage->logAssetStorageInfo();
|
||||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PICK("Picking");
|
||||
|
|
|
|||
Loading…
Reference in New Issue