summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2010-11-29 08:31:08 -0800
committerMonty Brandenberg <monty@lindenlab.com>2010-11-29 08:31:08 -0800
commit0f2ed092c5712cd5dcd928e079671df383227068 (patch)
tree70eec8ea6b184eec6b2681997bfb795d93ca9fe2 /indra/newview
parenta4bf7322895cac318abc3ac0a000086d227fc2fe (diff)
ESC-154 ESC-156 Now using region hash rather than region uuid as identifier.
In the viewer, the region's UUID is acquired very late and isn't generally used as the canonical region identifier. The U64 region hash is a better and more consistently used identifier so I'm moving over to using that as the region key. Don't have a proper reserved invalid region hash which is unfortunate, but then, so much is.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagent.cpp2
-rw-r--r--indra/newview/llappviewer.cpp10
-rw-r--r--indra/newview/llappviewer.h2
-rw-r--r--indra/newview/lltexturefetch.cpp18
-rw-r--r--indra/newview/lltexturefetch.h2
-rw-r--r--indra/newview/llviewerassetstats.cpp36
-rw-r--r--indra/newview/llviewerassetstats.h31
-rw-r--r--indra/newview/llviewerregion.cpp8
-rw-r--r--indra/newview/tests/llviewerassetstats_test.cpp88
9 files changed, 102 insertions, 95 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index e2b1c89402..d5eec0e151 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -639,7 +639,7 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
}
// Pass new region along to metrics components that care about this level of detail.
- LLAppViewer::metricsUpdateRegion(regionp->getRegionID());
+ LLAppViewer::metricsUpdateRegion(regionp->getHandle());
}
mRegionp = regionp;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index bf79523078..d73f3cd2fc 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4579,20 +4579,20 @@ bool LLAppViewer::getMasterSystemAudioMute()
* on the main thread, we need to send a message to move the data over safely
* and cheaply (amortized over a run).
*/
-void LLAppViewer::metricsUpdateRegion(const LLUUID & region_id)
+void LLAppViewer::metricsUpdateRegion(U64 region_handle)
{
- if (! region_id.isNull())
+ if (0 != region_handle)
{
- LLViewerAssetStatsFF::set_region_main(region_id);
+ LLViewerAssetStatsFF::set_region_main(region_handle);
if (LLAppViewer::sTextureFetch)
{
// Send a region update message into 'thread1' to get the new region.
- LLAppViewer::sTextureFetch->commandSetRegion(region_id);
+ LLAppViewer::sTextureFetch->commandSetRegion(region_handle);
}
else
{
// No 'thread1', a.k.a. TextureFetch, so update directly
- LLViewerAssetStatsFF::set_region_thread1(region_id);
+ LLViewerAssetStatsFF::set_region_thread1(region_handle);
}
}
}
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 27c104626a..6b83f2d80c 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -169,7 +169,7 @@ public:
virtual bool getMasterSystemAudioMute();
// Metrics policy helper statics.
- static void metricsUpdateRegion(const LLUUID & region_id);
+ static void metricsUpdateRegion(U64 region_handle);
static void metricsSend(bool enable_reporting);
protected:
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index f5e2e35e1e..3793085e55 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -506,9 +506,9 @@ public:
class TFReqSetRegion : public TFRequest
{
public:
- TFReqSetRegion(const LLUUID & region_id)
+ TFReqSetRegion(U64 region_handle)
: TFRequest(),
- mRegionID(region_id)
+ mRegionHandle(region_handle)
{}
TFReqSetRegion & operator=(const TFReqSetRegion &); // Not defined
@@ -518,7 +518,7 @@ public:
virtual bool doWork(LLTextureFetch * fetcher);
public:
- const LLUUID mRegionID;
+ const U64 mRegionHandle;
};
@@ -2654,9 +2654,9 @@ void LLTextureFetch::dump()
// cross-thread command methods
-void LLTextureFetch::commandSetRegion(const LLUUID & region_id)
+void LLTextureFetch::commandSetRegion(U64 region_handle)
{
- TFReqSetRegion * req = new TFReqSetRegion(region_id);
+ TFReqSetRegion * req = new TFReqSetRegion(region_handle);
cmdEnqueue(req);
}
@@ -2735,7 +2735,7 @@ namespace
bool
TFReqSetRegion::doWork(LLTextureFetch *)
{
- LLViewerAssetStatsFF::set_region_thread1(mRegionID);
+ LLViewerAssetStatsFF::set_region_thread1(mRegionHandle);
return true;
}
@@ -2806,9 +2806,9 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
// still being careful, regardless.
LLSD & main_stats = *mReportMain;
- LLSD thread1_stats = gViewerAssetStatsThread1->asLLSD(); // 'duration' & 'regions' from here
- thread1_stats["message"] = "ViewerAssetMetrics";
- thread1_stats["sequence"] = report_sequence;
+ LLSD thread1_stats = gViewerAssetStatsThread1->asLLSD(); // 'duration' & 'regions' from this LLSD
+ thread1_stats["message"] = "ViewerAssetMetrics"; // Identifies the type of metrics
+ thread1_stats["sequence"] = report_sequence; // Sequence number
thread1_stats["initial"] = ! reporting_started; // Initial data from viewer
thread1_stats["break"] = LLTextureFetch::svMetricsDataBreak; // Break in data prior to this report
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index bad0a1498f..03e2462058 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -86,7 +86,7 @@ public:
LLTextureInfo* getTextureInfo() { return &mTextureInfo; }
// Commands available to other threads to control metrics gathering operations.
- void commandSetRegion(const LLUUID & region_id);
+ void commandSetRegion(U64 region_handle);
void commandSendMetrics(const std::string & caps_url, LLSD * report_main);
void commandDataBreak();
diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp
index 502a3aa340..cc41a95893 100644
--- a/indra/newview/llviewerassetstats.cpp
+++ b/indra/newview/llviewerassetstats.cpp
@@ -130,6 +130,7 @@ LLViewerAssetStats::PerRegionStats::accumulateTime(duration_t now)
// LLViewerAssetStats class definition
// ------------------------------------------------------
LLViewerAssetStats::LLViewerAssetStats()
+ : mRegionHandle(U64(0))
{
reset();
}
@@ -149,11 +150,11 @@ LLViewerAssetStats::reset()
}
else
{
- mCurRegionStats = new PerRegionStats(mRegionID);
+ mCurRegionStats = new PerRegionStats(mRegionHandle);
}
// And add reference to map
- mRegionStats[mRegionID] = mCurRegionStats;
+ mRegionStats[mRegionHandle] = mCurRegionStats;
// Start timestamp consistent with per-region collector
mResetTimestamp = mCurRegionStats->mStartTimestamp;
@@ -161,9 +162,9 @@ LLViewerAssetStats::reset()
void
-LLViewerAssetStats::setRegionID(const LLUUID & region_id)
+LLViewerAssetStats::setRegion(region_handle_t region_handle)
{
- if (region_id == mRegionID)
+ if (region_handle == mRegionHandle)
{
// Already active, ignore.
return;
@@ -174,19 +175,19 @@ LLViewerAssetStats::setRegionID(const LLUUID & region_id)
mCurRegionStats->accumulateTime(now);
// Prepare new set
- PerRegionContainer::iterator new_stats = mRegionStats.find(region_id);
+ PerRegionContainer::iterator new_stats = mRegionStats.find(region_handle);
if (mRegionStats.end() == new_stats)
{
// Haven't seen this region_id before, create a new block and make it current.
- mCurRegionStats = new PerRegionStats(region_id);
- mRegionStats[region_id] = mCurRegionStats;
+ mCurRegionStats = new PerRegionStats(region_handle);
+ mRegionStats[region_handle] = mCurRegionStats;
}
else
{
mCurRegionStats = new_stats->second;
}
mCurRegionStats->mStartTimestamp = now;
- mRegionID = region_id;
+ mRegionHandle = region_handle;
}
@@ -245,9 +246,9 @@ LLViewerAssetStats::asLLSD()
mRegionStats.end() != it;
++it)
{
- if (it->first.isNull())
+ if (0 == it->first)
{
- // Never emit NULL UUID in results.
+ // Never emit NULL UUID/handle in results.
continue;
}
@@ -269,8 +270,11 @@ LLViewerAssetStats::asLLSD()
}
reg_stat["duration"] = LLSD::Real(stats.mTotalTime * 1.0e-6);
-
- regions[it->first.asString()] = reg_stat;
+ std::stringstream reg_handle;
+ reg_handle.width(16);
+ reg_handle.fill('0');
+ reg_handle << std::hex << it->first;
+ regions[reg_handle.str()] = reg_stat;
}
LLSD ret = LLSD::emptyMap();
@@ -487,12 +491,12 @@ namespace LLViewerAssetStatsFF
// 'main' thread - initial program thread
void
-set_region_main(const LLUUID & region_id)
+set_region_main(LLViewerAssetStats::region_handle_t region_handle)
{
if (! gViewerAssetStatsMain)
return;
- gViewerAssetStatsMain->setRegionID(region_id);
+ gViewerAssetStatsMain->setRegion(region_handle);
}
void
@@ -526,12 +530,12 @@ record_response_main(LLViewerAssetType::EType at, bool with_http, bool is_temp,
// 'thread1' - should be for TextureFetch thread
void
-set_region_thread1(const LLUUID & region_id)
+set_region_thread1(LLViewerAssetStats::region_handle_t region_handle)
{
if (! gViewerAssetStatsThread1)
return;
- gViewerAssetStatsThread1->setRegionID(region_id);
+ gViewerAssetStatsThread1->setRegion(region_handle);
}
void
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index b0fb17ae17..ed2d0f3922 100644
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
@@ -101,7 +101,14 @@ public:
* fetcher class, LLTextureFetch.
*/
typedef U64 duration_t;
-
+
+ /**
+ * Type for the region identifier used in stats. Currently uses
+ * the region handle's type (a U64) rather than the regions's LLUUID
+ * as the latter isn't available immediately.
+ */
+ typedef U64 region_handle_t;
+
/**
* @brief Collected data for a single region visited by the avatar.
*
@@ -112,9 +119,9 @@ public:
class PerRegionStats : public LLRefCount
{
public:
- PerRegionStats(const LLUUID & region_id)
+ PerRegionStats(const region_handle_t region_handle)
: LLRefCount(),
- mRegionID(region_id)
+ mRegionHandle(region_handle)
{
reset();
}
@@ -127,7 +134,7 @@ public:
void accumulateTime(duration_t now);
public:
- LLUUID mRegionID;
+ region_handle_t mRegionHandle;
duration_t mTotalTime;
duration_t mStartTimestamp;
@@ -151,14 +158,14 @@ public:
// Set hidden region argument and establish context for subsequent
// collection calls.
- void setRegionID(const LLUUID & region_id);
+ void setRegion(region_handle_t region_handle);
// Asset GET Requests
void recordGetEnqueued(LLViewerAssetType::EType at, bool with_http, bool is_temp);
void recordGetDequeued(LLViewerAssetType::EType at, bool with_http, bool is_temp);
void recordGetServiced(LLViewerAssetType::EType at, bool with_http, bool is_temp, duration_t duration);
- // Retrieve current metrics for all visited regions (NULL region UUID excluded)
+ // Retrieve current metrics for all visited regions (NULL region UUID/handle excluded)
// Returned LLSD is structured as follows:
//
// &stats_group = {
@@ -173,7 +180,7 @@ public:
// {
// duration: int
// regions: {
- // $: {
+ // $: { // Keys are strings of the region's handle in hex
// duration: : int,
// get_texture_temp_http : &stats_group,
// get_texture_temp_udp : &stats_group,
@@ -198,12 +205,12 @@ public:
static void mergeRegionsLLSD(const LLSD & src, LLSD & dst);
protected:
- typedef std::map<LLUUID, LLPointer<PerRegionStats> > PerRegionContainer;
+ typedef std::map<region_handle_t, LLPointer<PerRegionStats> > PerRegionContainer;
// Region of the currently-active region. Always valid but may
- // be a NULL UUID after construction or when explicitly set. Unchanged
+ // be zero after construction or when explicitly set. Unchanged
// by a reset() call.
- LLUUID mRegionID;
+ region_handle_t mRegionHandle;
// Pointer to metrics collection for currently-active region. Always
// valid and unchanged after reset() though contents will be changed.
@@ -262,7 +269,7 @@ inline LLViewerAssetStats::duration_t get_timestamp()
/**
* Region context, event and duration loggers for the Main thread.
*/
-void set_region_main(const LLUUID & region_id);
+void set_region_main(LLViewerAssetStats::region_handle_t region_handle);
void record_enqueue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp);
@@ -275,7 +282,7 @@ void record_response_main(LLViewerAssetType::EType at, bool with_http, bool is_t
/**
* Region context, event and duration loggers for Thread 1.
*/
-void set_region_thread1(const LLUUID & region_id);
+void set_region_thread1(LLViewerAssetStats::region_handle_t region_handle);
void record_enqueue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp);
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 717ef40465..79b45a459f 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1341,14 +1341,6 @@ void LLViewerRegion::unpackRegionHandshake()
msg->nextBlock("RegionInfo");
msg->addU32("Flags", 0x0 );
msg->sendReliable(host);
-
- // Inform metrics when a region associated with an agent
- // receives a regionID.
- if (gAgent.getRegion() == this)
- {
- // Region is active in agent, tell metrics about the region ID
- LLAppViewer::metricsUpdateRegion(region_id);
- }
}
void LLViewerRegion::setSeedCapability(const std::string& url)
diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp
index 8bedd2c860..153056b3cd 100644
--- a/indra/newview/tests/llviewerassetstats_test.cpp
+++ b/indra/newview/tests/llviewerassetstats_test.cpp
@@ -78,6 +78,10 @@ static const char * sub_keys[] =
static const LLUUID region1("4e2d81a3-6263-6ffe-ad5c-8ce04bee07e8");
static const LLUUID region2("68762cc8-b68b-4e45-854b-e830734f2d4a");
+static const U64 region1_handle(0x00000401000003f7ULL);
+static const U64 region2_handle(0x000003f800000420ULL);
+static const std::string region1_handle_str("00000401000003f7");
+static const std::string region2_handle_str("000003f800000420");
#if 0
static bool
@@ -144,12 +148,12 @@ namespace tut
ensure("Stat-less LLSD initially", is_no_stats_map(sd_full));
// Once the region is set, we will get a response even with no data collection
- it->setRegionID(region1);
+ it->setRegion(region1_handle);
sd_full = it->asLLSD();
ensure("Correct single-key LLSD map root", is_double_key_map(sd_full, "duration", "regions"));
- ensure("Correct single-key LLSD map regions", is_single_key_map(sd_full["regions"], region1.asString()));
+ ensure("Correct single-key LLSD map regions", is_single_key_map(sd_full["regions"], region1_handle_str));
- LLSD sd = sd_full["regions"][region1.asString()];
+ LLSD sd = sd_full["regions"][region1_handle_str];
delete it;
@@ -175,12 +179,12 @@ namespace tut
void tst_viewerassetstats_index_object_t::test<3>()
{
LLViewerAssetStats * it = new LLViewerAssetStats();
- it->setRegionID(region1);
+ it->setRegion(region1_handle);
LLSD sd = it->asLLSD();
ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
- ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region1.asString()));
- sd = sd[region1.asString()];
+ ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region1_handle_str));
+ sd = sd[region1_handle_str];
delete it;
@@ -194,7 +198,7 @@ namespace tut
void tst_viewerassetstats_index_object_t::test<4>()
{
gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1);
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
@@ -204,8 +208,8 @@ namespace tut
LLSD sd = gViewerAssetStatsMain->asLLSD();
ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
- ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region1.asString()));
- sd = sd["regions"][region1.asString()];
+ ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region1_handle_str));
+ sd = sd["regions"][region1_handle_str];
// Check a few points on the tree for content
ensure("sd[get_texture_non_temp_udp][enqueued] is 1", (1 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
@@ -217,7 +221,7 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD()["regions"][region1.asString()];
+ sd = gViewerAssetStatsMain->asLLSD()["regions"][region1_handle_str];
delete gViewerAssetStatsMain;
gViewerAssetStatsMain = NULL;
@@ -232,7 +236,7 @@ namespace tut
{
gViewerAssetStatsThread1 = new LLViewerAssetStats();
gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1);
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
@@ -244,8 +248,8 @@ namespace tut
ensure("Other collector is empty", is_no_stats_map(sd));
sd = gViewerAssetStatsMain->asLLSD();
ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
- ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region1.asString()));
- sd = sd["regions"][region1.asString()];
+ ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region1_handle_str));
+ sd = sd["regions"][region1_handle_str];
// Check a few points on the tree for content
ensure("sd[get_texture_non_temp_udp][enqueued] is 1", (1 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
@@ -257,7 +261,7 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD()["regions"][region1.asString()];
+ sd = gViewerAssetStatsMain->asLLSD()["regions"][region1_handle_str];
delete gViewerAssetStatsMain;
gViewerAssetStatsMain = NULL;
@@ -274,7 +278,7 @@ namespace tut
{
gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1);
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
@@ -282,7 +286,7 @@ namespace tut
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::set_region_main(region2);
+ LLViewerAssetStatsFF::set_region_main(region2_handle);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
@@ -294,9 +298,9 @@ namespace tut
// std::cout << sd << std::endl;
ensure("Correct double-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
- ensure("Correct double-key LLSD map regions", is_double_key_map(sd["regions"], region1.asString(), region2.asString()));
- LLSD sd1 = sd["regions"][region1.asString()];
- LLSD sd2 = sd["regions"][region2.asString()];
+ ensure("Correct double-key LLSD map regions", is_double_key_map(sd["regions"], region1_handle_str, region2_handle_str));
+ LLSD sd1 = sd["regions"][region1_handle_str];
+ LLSD sd2 = sd["regions"][region2_handle_str];
// Check a few points on the tree for content
ensure("sd1[get_texture_non_temp_udp][enqueued] is 1", (1 == sd1["get_texture_non_temp_udp"]["enqueued"].asInteger()));
@@ -315,8 +319,8 @@ namespace tut
gViewerAssetStatsMain->reset();
sd = gViewerAssetStatsMain->asLLSD();
ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
- ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region2.asString()));
- sd2 = sd["regions"][region2.asString()];
+ ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region2_handle_str));
+ sd2 = sd["regions"][region2_handle_str];
delete gViewerAssetStatsMain;
gViewerAssetStatsMain = NULL;
@@ -331,7 +335,7 @@ namespace tut
{
gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1);
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
@@ -339,14 +343,14 @@ namespace tut
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::set_region_main(region2);
+ LLViewerAssetStatsFF::set_region_main(region2_handle);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::set_region_main(region1);
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, true, true);
LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, true, true);
@@ -354,7 +358,7 @@ namespace tut
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::set_region_main(region2);
+ LLViewerAssetStatsFF::set_region_main(region2_handle);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
@@ -364,9 +368,9 @@ namespace tut
LLSD sd = gViewerAssetStatsMain->asLLSD();
ensure("Correct double-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
- ensure("Correct double-key LLSD map regions", is_double_key_map(sd["regions"], region1.asString(), region2.asString()));
- LLSD sd1 = sd["regions"][region1.asString()];
- LLSD sd2 = sd["regions"][region2.asString()];
+ ensure("Correct double-key LLSD map regions", is_double_key_map(sd["regions"], region1_handle_str, region2_handle_str));
+ LLSD sd1 = sd["regions"][region1_handle_str];
+ LLSD sd2 = sd["regions"][region2_handle_str];
// Check a few points on the tree for content
ensure("sd1[get_texture_non_temp_udp][enqueued] is 1", (1 == sd1["get_texture_non_temp_udp"]["enqueued"].asInteger()));
@@ -385,8 +389,8 @@ namespace tut
gViewerAssetStatsMain->reset();
sd = gViewerAssetStatsMain->asLLSD();
ensure("Correct single-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
- ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region2.asString()));
- sd2 = sd["regions"][region2.asString()];
+ ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region2_handle_str));
+ sd2 = sd["regions"][region2_handle_str];
delete gViewerAssetStatsMain;
gViewerAssetStatsMain = NULL;
@@ -401,7 +405,7 @@ namespace tut
{
gViewerAssetStatsThread1 = new LLViewerAssetStats();
gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1);
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
@@ -430,8 +434,8 @@ namespace tut
ensure("Other collector is empty", is_no_stats_map(sd));
sd = gViewerAssetStatsMain->asLLSD();
ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
- ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region1.asString()));
- sd = sd["regions"][region1.asString()];
+ ensure("Correct single-key LLSD map regions", is_single_key_map(sd["regions"], region1_handle_str));
+ sd = sd["regions"][region1_handle_str];
// Check a few points on the tree for content
ensure("sd[get_gesture_udp][enqueued] is 0", (0 == sd["get_gesture_udp"]["enqueued"].asInteger()));
@@ -446,7 +450,7 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD()["regions"][region1.asString()];
+ sd = gViewerAssetStatsMain->asLLSD()["regions"][region1_handle_str];
delete gViewerAssetStatsMain;
gViewerAssetStatsMain = NULL;
@@ -461,8 +465,8 @@ namespace tut
template<> template<>
void tst_viewerassetstats_index_object_t::test<9>()
{
- LLSD::String reg1_name = region1.asString();
- LLSD::String reg2_name = region2.asString();
+ LLSD::String reg1_name = region1_handle_str;
+ LLSD::String reg2_name = region2_handle_str;
LLSD reg1_stats = LLSD::emptyMap();
LLSD reg2_stats = LLSD::emptyMap();
@@ -523,8 +527,8 @@ namespace tut
template<> template<>
void tst_viewerassetstats_index_object_t::test<10>()
{
- LLSD::String reg1_name = region1.asString();
- LLSD::String reg2_name = region2.asString();
+ LLSD::String reg1_name = region1_handle_str;
+ LLSD::String reg2_name = region2_handle_str;
LLSD reg1_stats = LLSD::emptyMap();
LLSD reg2_stats = LLSD::emptyMap();
@@ -580,8 +584,8 @@ namespace tut
template<> template<>
void tst_viewerassetstats_index_object_t::test<11>()
{
- LLSD::String reg1_name = region1.asString();
- LLSD::String reg2_name = region2.asString();
+ LLSD::String reg1_name = region1_handle_str;
+ LLSD::String reg2_name = region2_handle_str;
LLSD reg1_stats = LLSD::emptyMap();
LLSD reg2_stats = LLSD::emptyMap();
@@ -637,8 +641,8 @@ namespace tut
template<> template<>
void tst_viewerassetstats_index_object_t::test<12>()
{
- LLSD::String reg1_name = region1.asString();
- LLSD::String reg2_name = region2.asString();
+ LLSD::String reg1_name = region1_handle_str;
+ LLSD::String reg2_name = region2_handle_str;
LLSD reg1_stats = LLSD::emptyMap();
LLSD reg2_stats = LLSD::emptyMap();