summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-03-10 22:02:49 -0800
committerMerov Linden <merov@lindenlab.com>2011-03-10 22:02:49 -0800
commitc2e88db89a8ba111efd0c1b61cc8dec400a007cb (patch)
treee4e8239133679c5ed284cbee7895d6a2e20862fa /indra/llcommon
parent18a66fb7618c80108d224c9b1c3ff14cc5f3a87f (diff)
STORM-987 : Took Vadim's comment into account: check arguments consistency, make sure remaining perf data are flushed on exit.
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llmetricperformancetester.cpp13
-rw-r--r--indra/llcommon/llmetricperformancetester.h6
2 files changed, 18 insertions, 1 deletions
diff --git a/indra/llcommon/llmetricperformancetester.cpp b/indra/llcommon/llmetricperformancetester.cpp
index 1f1c633909..41d3eb0bf3 100644
--- a/indra/llcommon/llmetricperformancetester.cpp
+++ b/indra/llcommon/llmetricperformancetester.cpp
@@ -63,7 +63,18 @@ BOOL LLMetricPerformanceTesterBasic::addTester(LLMetricPerformanceTesterBasic* t
sTesterMap.insert(std::make_pair(name, tester));
return TRUE;
}
-
+
+/*static*/
+void LLMetricPerformanceTesterBasic::deleteTester(std::string name)
+{
+ name_tester_map_t::iterator tester = sTesterMap.find(name);
+ if (tester != sTesterMap.end())
+ {
+ delete tester->second;
+ sTesterMap.erase(tester);
+ }
+}
+
/*static*/
LLMetricPerformanceTesterBasic* LLMetricPerformanceTesterBasic::getTester(std::string name)
{
diff --git a/indra/llcommon/llmetricperformancetester.h b/indra/llcommon/llmetricperformancetester.h
index b790b636a7..1a18cdf36f 100644
--- a/indra/llcommon/llmetricperformancetester.h
+++ b/indra/llcommon/llmetricperformancetester.h
@@ -138,6 +138,12 @@ public:
static LLMetricPerformanceTesterBasic* getTester(std::string name) ;
/**
+ * @return Delete the named tester from the list
+ * @param[in] name - Name of the tester instance to delete.
+ */
+ static void deleteTester(std::string name);
+
+ /**
* @return Returns TRUE if that metric *or* the default catch all metric has been requested to be logged
* @param[in] name - Name of the tester queried.
*/