aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llframestats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llframestats.cpp')
-rw-r--r--linden/indra/newview/llframestats.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/linden/indra/newview/llframestats.cpp b/linden/indra/newview/llframestats.cpp
index c7519c9..537753e 100644
--- a/linden/indra/newview/llframestats.cpp
+++ b/linden/indra/newview/llframestats.cpp
@@ -41,7 +41,7 @@
41LLFrameStats gFrameStats; 41LLFrameStats gFrameStats;
42 42
43// static 43// static
44char *LLFrameStats::sStatLabels[NUM_STATS] = { 44std::string LLFrameStats::sStatLabels[NUM_STATS] = {
45 "IdleNetwork", 45 "IdleNetwork",
46 "AgentMisc", 46 "AgentMisc",
47 "ObjectUpdate", 47 "ObjectUpdate",
@@ -178,12 +178,12 @@ void LLFrameStats::dump()
178 178
179 static S32 dump_count = 0; 179 static S32 dump_count = 0;
180 180
181 char file_with_num[256]; /* Flawfinder: ignore */ 181 std::string file_with_num;
182 snprintf(file_with_num, sizeof(file_with_num), "fs%d.txt", dump_count); /* Flawfinder: ignore */ 182 file_with_num = llformat("fs%d.txt", dump_count);
183 dump_count++; 183 dump_count++;
184 184
185 char filename[LL_MAX_PATH]; /* Flawfinder: ignore */ 185 std::string filename;
186 snprintf(filename, LL_MAX_PATH, "%s", gDirUtilp->getExpandedFilename(LL_PATH_LOGS, file_with_num).c_str()); /* Flawfinder: ignore */ 186 filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, file_with_num);
187 LLFILE *fp = LLFile::fopen(filename, "w"); /* Flawfinder: ignore */ 187 LLFILE *fp = LLFile::fopen(filename, "w"); /* Flawfinder: ignore */
188 if (!fp) 188 if (!fp)
189 { 189 {
@@ -197,7 +197,7 @@ void LLFrameStats::dump()
197 S32 i; 197 S32 i;
198 for (i = 0; i < NUM_STATS; i++) 198 for (i = 0; i < NUM_STATS; i++)
199 { 199 {
200 fprintf(fp, "%s\t", sStatLabels[i]); 200 fprintf(fp, "%s\t", sStatLabels[i].c_str());
201 } 201 }
202 fprintf(fp, "Full Updates\tTerse Updates\tTotal Vorbis\tLong Vorbis\tNum Vorbis Decodes\t"); 202 fprintf(fp, "Full Updates\tTerse Updates\tTotal Vorbis\tLong Vorbis\tNum Vorbis Decodes\t");
203 fprintf(fp, "\n"); 203 fprintf(fp, "\n");
@@ -224,7 +224,7 @@ void LLFrameStats::dump()
224 fclose(fp); 224 fclose(fp);
225 225
226 // Now dump cumulative stats 226 // Now dump cumulative stats
227 snprintf(filename, LL_MAX_PATH, "%s", gDirUtilp->getExpandedFilename(LL_PATH_LOGS, mSummaryFilename.c_str()).c_str()); /* Flawfinder: ignore */ 227 filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, mSummaryFilename);
228 fp = LLFile::fopen(filename, "a"); /* Flawfinder: ignore */ 228 fp = LLFile::fopen(filename, "a"); /* Flawfinder: ignore */
229 if (!fp) 229 if (!fp)
230 { 230 {
@@ -306,7 +306,3 @@ void LLFrameStats::timedLogging10(void *)
306 gFrameStats.mUseTimer = TRUE; 306 gFrameStats.mUseTimer = TRUE;
307} 307}
308 308
309const char *LLFrameStats::getCurStatName() const
310{
311 return getStatLabel(mCurrentStat);
312}