diff options
| -rwxr-xr-x | indra/newview/llvoavatar.cpp | 37 | ||||
| -rwxr-xr-x | indra/newview/llvoavatar.h | 2 | ||||
| -rwxr-xr-x | indra/newview/llvoavatarself.cpp | 16 | ||||
| -rwxr-xr-x[-rw-r--r--] | indra/newview/llvoavatarself.h | 1 | 
4 files changed, 42 insertions, 14 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9249e0fa21..dbb9c218d3 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -797,6 +797,9 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c  			<< " : " << comment  			<< llendl; +	LLSD metrics = gAgentAvatarp->metricsData(); +	llinfos << gAgentAvatarp->avString() << " metrics " << metrics << llendl; +  	if (gSavedSettings.getBOOL("DebugAvatarRezTime"))  	{  		LLSD args; @@ -807,17 +810,6 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c  	}  } -// Dump avatar metrics data. -// virtual -LLSD LLVOAvatar::metricsData() -{ -	LLSD result; -	result["id"] = getID(); -	result["rez_status"] = getRezzedStatus(); -	result["is_self"] = isSelf(); -	return result; -} -  //------------------------------------------------------------------------  // LLVOAvatar::~LLVOAvatar()  //------------------------------------------------------------------------ @@ -957,9 +949,9 @@ BOOL LLVOAvatar::hasGray() const  S32 LLVOAvatar::getRezzedStatus() const  {  	if (getIsCloud()) return 0; -	if (hasGray()) return 1;  	if (isFullyTextured()) return 2; -	return -1; +	llassert(hasGray()); +	return 1; // gray  }  void LLVOAvatar::deleteLayerSetCaches(bool clearAll) @@ -1009,6 +1001,22 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)  }  // static +void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts) +{ +	counts.clear(); +	counts.resize(3); +	for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); +		 iter != LLCharacter::sInstances.end(); ++iter) +	{ +		LLVOAvatar* inst = (LLVOAvatar*) *iter; +		if (!inst) +			continue; +		S32 rez_status = inst->getRezzedStatus(); +		counts[rez_status]++; +	} +} + +// static  void LLVOAvatar::dumpBakedStatus()  {  	LLVector3d camera_pos_global = gAgentCamera.getCameraPositionGlobal(); @@ -7733,6 +7741,9 @@ void LLVOAvatar::cullAvatarsByPixelArea()  		}  	} +	// runway - this doesn't detect gray/grey state. +	// think we just need to be checking self av since it's the only +	// one with lltexlayer stuff.  	S32 grey_avatars = 0;  	if (LLVOAvatar::areAllNearbyInstancesBaked(grey_avatars))  	{ diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 9a9ba85eb2..d4166a66b2 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -524,6 +524,7 @@ public:  	BOOL			isFullyBaked();  	static BOOL		areAllNearbyInstancesBaked(S32& grey_avatars); +	static void		getNearbyRezzedStats(std::vector<S32>& counts);  	//--------------------------------------------------------------------  	// Baked textures @@ -989,7 +990,6 @@ private:  public:  	void 			debugAvatarRezTime(std::string notification_name, std::string comment = "");  	F32				debugGetExistenceTimeElapsedF32() const { return mDebugExistenceTimer.getElapsedTimeF32(); } -	LLSD			metricsData();  protected:  	LLFrameTimer	mRuthDebugTimer; // For tracking how long it takes for av to rez diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 467961c55e..0a60ef4fff 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2054,6 +2054,22 @@ const std::string LLVOAvatarSelf::debugDumpAllLocalTextureDataInfo() const  	return text;  } +// Dump avatar metrics data. +LLSD LLVOAvatarSelf::metricsData() +{ +	LLSD result; +	result["id"] = getID(); +	result["rez_status"] = getRezzedStatus(); +	result["is_self"] = isSelf(); +	std::vector<S32> rez_counts; +	LLVOAvatar::getNearbyRezzedStats(rez_counts); +	result["nearby_cloud"] = rez_counts[0]; +	result["nearby_gray"] = rez_counts[1]; +	result["nearby_textured"] = rez_counts[2]; +	 +	return result; +} +  const LLUUID& LLVOAvatarSelf::grabBakedTexture(EBakedTextureIndex baked_index) const  {  	if (canGrabBakedTexture(baked_index)) diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 6aadf4533e..aaceff933a 100644..100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -369,6 +369,7 @@ public:  	const LLTexLayerSet*  	debugGetLayerSet(LLVOAvatarDefines::EBakedTextureIndex index) const { return mBakedTextureDatas[index].mTexLayerSet; }  	const std::string		debugDumpLocalTextureDataInfo(const LLTexLayerSet* layerset) const; // Lists out state of this particular baked texture layer  	const std::string		debugDumpAllLocalTextureDataInfo() const; // Lists out which baked textures are at highest LOD +	LLSD					metricsData();  private:  	LLFrameTimer    		mDebugSelfLoadTimer;  	F32						mDebugTimeWearablesLoaded;  | 
