summaryrefslogtreecommitdiff
path: root/indra/newview/llfasttimerview.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-04-06 07:35:29 -0400
committerOz Linden <oz@lindenlab.com>2011-04-06 07:35:29 -0400
commit96adfcfaedb2304661df15223a3df7f701b73493 (patch)
tree484b3b99cc411a394694721f5b309f07839f1a2a /indra/newview/llfasttimerview.cpp
parent40e14802e3f5bc78546c8ed38fb1a28e46b0dd7c (diff)
parentf41cbc0ac85ae328f2701aab23e94c0ef7ab5758 (diff)
merge changes for vwr-25269
Diffstat (limited to 'indra/newview/llfasttimerview.cpp')
-rw-r--r--indra/newview/llfasttimerview.cpp74
1 files changed, 1 insertions, 73 deletions
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 92a3b9b2f5..279904b740 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -1149,36 +1149,6 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target
os.close();
}
-//-------------------------
-//static
-LLSD LLFastTimerView::analyzeMetricPerformanceLog(std::istream& is)
-{
- LLSD ret;
- LLSD cur;
-
- while (!is.eof() && LLSDSerialize::fromXML(cur, is))
- {
- for (LLSD::map_iterator iter = cur.beginMap(); iter != cur.endMap(); ++iter)
- {
- std::string label = iter->first;
-
- LLMetricPerformanceTesterBasic* tester = LLMetricPerformanceTesterBasic::getTester(iter->second["Name"].asString()) ;
- if(tester)
- {
- ret[label]["Name"] = iter->second["Name"] ;
-
- S32 num_of_metrics = tester->getNumberOfMetrics() ;
- for(S32 index = 0 ; index < num_of_metrics ; index++)
- {
- ret[label][ tester->getMetricName(index) ] = iter->second[ tester->getMetricName(index) ] ;
- }
- }
- }
- }
-
- return ret;
-}
-
//static
void LLFastTimerView::outputAllMetrics()
{
@@ -1194,48 +1164,6 @@ void LLFastTimerView::outputAllMetrics()
}
//static
-void LLFastTimerView::doAnalysisMetrics(std::string baseline, std::string target, std::string output)
-{
- if(!LLMetricPerformanceTesterBasic::hasMetricPerformanceTesters())
- {
- return ;
- }
-
- // Open baseline and current target, exit if one is inexistent
- std::ifstream base_is(baseline.c_str());
- std::ifstream target_is(target.c_str());
- if (!base_is.is_open() || !target_is.is_open())
- {
- llwarns << "'-analyzeperformance' error : baseline or current target file inexistent" << llendl;
- base_is.close();
- target_is.close();
- return;
- }
-
- //analyze baseline
- LLSD base = analyzeMetricPerformanceLog(base_is);
- base_is.close();
-
- //analyze current
- LLSD current = analyzeMetricPerformanceLog(target_is);
- target_is.close();
-
- //output comparision
- std::ofstream os(output.c_str());
-
- os << "Label, Metric, Base(B), Target(T), Diff(T-B), Percentage(100*T/B)\n";
- for(LLMetricPerformanceTesterBasic::name_tester_map_t::iterator iter = LLMetricPerformanceTesterBasic::sTesterMap.begin() ;
- iter != LLMetricPerformanceTesterBasic::sTesterMap.end() ; ++iter)
- {
- LLMetricPerformanceTesterBasic* tester = ((LLMetricPerformanceTesterBasic*)iter->second) ;
- tester->analyzePerformance(&os, &base, &current) ;
- }
-
- os.flush();
- os.close();
-}
-
-//static
void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::string output)
{
if(LLFastTimer::sLog)
@@ -1246,7 +1174,7 @@ void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::
if(LLFastTimer::sMetricLog)
{
- doAnalysisMetrics(baseline, target, output) ;
+ LLMetricPerformanceTesterBasic::doAnalysisMetrics(baseline, target, output) ;
return ;
}
}