From 89327ba657908ab0a1c25329d015ce6cbf1fc302 Mon Sep 17 00:00:00 2001 From: "stephend%netscape.com" Date: Mon, 31 Dec 2001 00:23:35 +0000 Subject: [PATCH] Bug 99580. Cleanup/formatting for msgcompose:5 logging. r=ducarroz@netscape.com, sr=mscott@netscape.com --- mailnews/compose/src/nsMsgCompose.cpp | 6 +++--- mailnews/compose/src/nsMsgComposeService.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/mailnews/compose/src/nsMsgCompose.cpp b/mailnews/compose/src/nsMsgCompose.cpp index 711602e6e29..7775d8ad6d8 100644 --- a/mailnews/compose/src/nsMsgCompose.cpp +++ b/mailnews/compose/src/nsMsgCompose.cpp @@ -1947,13 +1947,13 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIRequest *request, ns #ifdef MSGCOMP_TRACE_PERFORMANCE nsCOMPtr composeService (do_GetService(NS_MSGCOMPOSESERVICE_CONTRACTID)); - composeService->TimeStamp("done with mime. Lets update some UI element", PR_FALSE); + composeService->TimeStamp("Done with MIME. Now we're updating the UI elements", PR_FALSE); #endif compose->NotifyStateListeners(eComposeFieldsReady, NS_OK); #ifdef MSGCOMP_TRACE_PERFORMANCE - composeService->TimeStamp("addressing widget, windows title and focus are now set, time to insert the body", PR_FALSE); + composeService->TimeStamp("Addressing widget, window title and focus are now set, time to insert the body", PR_FALSE); #endif if (! mHeadersOnly) @@ -2710,7 +2710,7 @@ nsMsgDocumentStateListener::NotifyDocumentCreated(void) #ifdef MSGCOMP_TRACE_PERFORMANCE nsCOMPtr composeService (do_GetService(NS_MSGCOMPOSESERVICE_CONTRACTID)); - composeService->TimeStamp("Editor is done loading about::blank. Now let mime do its job", PR_FALSE); + composeService->TimeStamp("Editor is done loading about:blank. This is New Compose window time. Time for MIME.", PR_FALSE); #endif nsCOMPtrcompose = do_QueryReferent(mWeakComposeObj); diff --git a/mailnews/compose/src/nsMsgComposeService.cpp b/mailnews/compose/src/nsMsgComposeService.cpp index 5e1ec394e05..3081f963e56 100644 --- a/mailnews/compose/src/nsMsgComposeService.cpp +++ b/mailnews/compose/src/nsMsgComposeService.cpp @@ -21,7 +21,7 @@ * * Contributor(s): * Jean-Francois Ducarroz - * Pierre Phaneuf + * Pierre Phaneuf * Seth Spitzer * * Alternatively, the contents of this file may be used under the terms of @@ -528,7 +528,7 @@ NS_IMETHODIMP nsMsgComposeService::TimeStamp(const char * label, PRBool resetTim if (resetTime) { - PR_LOG(MsgComposeLogModule, PR_LOG_ALWAYS, ("--------------------\n")); + PR_LOG(MsgComposeLogModule, PR_LOG_ALWAYS, ("\n[process]: [totalTime][deltaTime]\n--------------------\n")); mStartTime = PR_IntervalNow(); mPreviousTime = mStartTime; @@ -543,7 +543,8 @@ NS_IMETHODIMP nsMsgComposeService::TimeStamp(const char * label, PRBool resetTim #if defined(DEBUG_ducarroz) printf(">>> Time Stamp: [%5d][%5d] - %s\n", totalTime, deltaTime, label); #endif - PR_LOG(MsgComposeLogModule, PR_LOG_ALWAYS, ("[%5d][%5d] - %s\n", totalTime, deltaTime, label)); + PR_LOG(MsgComposeLogModule, PR_LOG_ALWAYS, ("[%3.2f][%3.2f] - %s\n", +((double)totalTime/1000.0) + 0.005, ((double)deltaTime/1000.0) + 0.005, label)); mPreviousTime = now; #endif