summaryrefslogtreecommitdiff
path: root/indra/newview/llfasttimerview.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2010-09-08 23:03:56 -0700
committerMerov Linden <merov@lindenlab.com>2010-09-08 23:03:56 -0700
commit39e5d2ecf04deceda92d6a53413298ca1c3bc0c7 (patch)
treece5a8a34f47703f5ee564945b906e9c3f9d684e2 /indra/newview/llfasttimerview.cpp
parent63f2ddf377fa0fc6a666cdc1001289335d86258b (diff)
VWR-22761 : Rearchitecture of llmetricperformancetester and simple (non complete) implementation in llimagej2c
Diffstat (limited to 'indra/newview/llfasttimerview.cpp')
-rw-r--r--indra/newview/llfasttimerview.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index b715647143..07ff3a91a1 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -1144,15 +1144,15 @@ LLSD LLFastTimerView::analyzeMetricPerformanceLog(std::istream& is)
{
std::string label = iter->first;
- LLMetricPerformanceTester* tester = LLMetricPerformanceTester::getTester(iter->second["Name"].asString()) ;
+ LLMetricPerformanceTesterBasic* tester = LLMetricPerformanceTesterBasic::getTester(iter->second["Name"].asString()) ;
if(tester)
{
ret[label]["Name"] = iter->second["Name"] ;
- S32 num_of_strings = tester->getNumOfMetricStrings() ;
- for(S32 index = 0 ; index < num_of_strings ; index++)
+ S32 num_of_metrics = tester->getNumberOfMetrics() ;
+ for(S32 index = 0 ; index < num_of_metrics ; index++)
{
- ret[label][ tester->getMetricString(index) ] = iter->second[ tester->getMetricString(index) ] ;
+ ret[label][ tester->getMetricName(index) ] = iter->second[ tester->getMetricName(index) ] ;
}
}
}
@@ -1162,9 +1162,23 @@ LLSD LLFastTimerView::analyzeMetricPerformanceLog(std::istream& is)
}
//static
+void LLFastTimerView::outputAllMetrics()
+{
+ if (LLMetricPerformanceTesterBasic::hasMetricPerformanceTesters())
+ {
+ for (LLMetricPerformanceTesterBasic::name_tester_map_t::iterator iter = LLMetricPerformanceTesterBasic::sTesterMap.begin();
+ iter != LLMetricPerformanceTesterBasic::sTesterMap.end(); ++iter)
+ {
+ LLMetricPerformanceTesterBasic* tester = ((LLMetricPerformanceTesterBasic*)iter->second);
+ tester->outputTestResults();
+ }
+ }
+}
+
+//static
void LLFastTimerView::doAnalysisMetrics(std::string baseline, std::string target, std::string output)
{
- if(!LLMetricPerformanceTester::hasMetricPerformanceTesters())
+ if(!LLMetricPerformanceTesterBasic::hasMetricPerformanceTesters())
{
return ;
}
@@ -1183,10 +1197,10 @@ void LLFastTimerView::doAnalysisMetrics(std::string baseline, std::string target
std::ofstream os(output.c_str());
os << "Label, Metric, Base(B), Target(T), Diff(T-B), Percentage(100*T/B)\n";
- for(LLMetricPerformanceTester::name_tester_map_t::iterator iter = LLMetricPerformanceTester::sTesterMap.begin() ;
- iter != LLMetricPerformanceTester::sTesterMap.end() ; ++iter)
+ for(LLMetricPerformanceTesterBasic::name_tester_map_t::iterator iter = LLMetricPerformanceTesterBasic::sTesterMap.begin() ;
+ iter != LLMetricPerformanceTesterBasic::sTesterMap.end() ; ++iter)
{
- LLMetricPerformanceTester* tester = ((LLMetricPerformanceTester*)iter->second) ;
+ LLMetricPerformanceTesterBasic* tester = ((LLMetricPerformanceTesterBasic*)iter->second) ;
tester->analyzePerformance(&os, &base, &current) ;
}