diff options
author | Merov Linden <merov@lindenlab.com> | 2010-10-27 23:15:22 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2010-10-27 23:15:22 -0700 |
commit | 40979589afc5c91cab977307a1e400315b1c8a8f (patch) | |
tree | f12b89dc3256ad80c5b90c70ed4ebf2a4018a3c0 /indra/newview/llfasttimerview.cpp | |
parent | e29bb9d9f87dc747b7e9cd204a1599a668d986d0 (diff) |
STORM-105 : improve decompression perf gathering, allow perf name to be passed on the command line, fix crash in analysis phase
Diffstat (limited to 'indra/newview/llfasttimerview.cpp')
-rw-r--r-- | indra/newview/llfasttimerview.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 06b145e8c8..5b6a25a041 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -1086,14 +1086,22 @@ LLSD LLFastTimerView::analyzePerformanceLogDefault(std::istream& is) //static void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target, std::string output) { + // 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 - std::ifstream base_is(baseline.c_str()); LLSD base = analyzePerformanceLogDefault(base_is); base_is.close(); //analyze current - std::ifstream target_is(target.c_str()); LLSD current = analyzePerformanceLogDefault(target_is); target_is.close(); @@ -1193,13 +1201,22 @@ void LLFastTimerView::doAnalysisMetrics(std::string baseline, std::string target return ; } - //analyze baseline + // 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 - std::ifstream target_is(target.c_str()); LLSD current = analyzeMetricPerformanceLog(target_is); target_is.close(); |