Use NSPR logging rather than printf's for stopwatch output.
git-svn-id: svn://10.0.0.236/trunk@48975 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1718,9 +1718,9 @@ HTMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
|
||||
// NRA Dump stopwatch stop info here
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
NS_STOP_STOPWATCH(mWatch)
|
||||
printf("Content creation time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Content creation time: "));
|
||||
mWatch.Print();
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
#endif
|
||||
|
||||
if (nsnull == mTitle) {
|
||||
|
||||
@@ -2095,7 +2095,7 @@ nsWebShell::DoLoadURL(nsIURI * aUri,
|
||||
nsresult rv = NS_OK;
|
||||
rv = aUri->GetSpec(&url);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
printf("*** Timing layout processes on url: '%s'\n", url);
|
||||
RAPTOR_STOPWATCH_TRACE(("*** Timing layout processes on url: '%s'\n", url));
|
||||
delete [] url;
|
||||
}
|
||||
}
|
||||
@@ -3356,9 +3356,9 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
{
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
NS_STOP_STOPWATCH(mTotalTime)
|
||||
printf("Total Layout+Load Time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Total (Layout + Page Load) Time: "));
|
||||
mTotalTime.Print();
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
#endif
|
||||
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
@@ -940,9 +940,9 @@ nsresult nsParser::ResumeParse(nsIDTD* aDefaultDTD, PRBool aIsFinalChunk) {
|
||||
// mTotalTime.Print();
|
||||
// printf("\n");
|
||||
|
||||
printf("Parse Time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Parse Time: "));
|
||||
mParseTime.Print();
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
|
||||
#endif
|
||||
return mInternalState;
|
||||
|
||||
@@ -1185,22 +1185,22 @@ PresShell::EndLoad(nsIDocument *aDocument)
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
// Dump reflow, style resolution and frame construction times here.
|
||||
NS_STOP_STOPWATCH(mReflowWatch)
|
||||
printf("Reflow time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Reflow time: "));
|
||||
mReflowWatch.Print();
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
NS_STOP_STOPWATCH(mFrameCreationWatch)
|
||||
printf("Frame construction plus style resolution time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Frame construction plus style resolution time: "));
|
||||
mFrameCreationWatch.Print();
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
|
||||
// Print style resolution stopwatch maintained by style set
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsITimeRecorder> watch = do_QueryInterface(mStyleSet, &rv);
|
||||
if (NS_SUCCEEDED(rv) && watch) {
|
||||
watch->StopTimer(NS_TIMER_STYLE_RESOLUTION);
|
||||
printf("Style resolution time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Style resolution time: "));
|
||||
watch->PrintTimer(NS_TIMER_STYLE_RESOLUTION);
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
|
||||
@@ -1185,22 +1185,22 @@ PresShell::EndLoad(nsIDocument *aDocument)
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
// Dump reflow, style resolution and frame construction times here.
|
||||
NS_STOP_STOPWATCH(mReflowWatch)
|
||||
printf("Reflow time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Reflow time: "));
|
||||
mReflowWatch.Print();
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
NS_STOP_STOPWATCH(mFrameCreationWatch)
|
||||
printf("Frame construction plus style resolution time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Frame construction plus style resolution time: "));
|
||||
mFrameCreationWatch.Print();
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
|
||||
// Print style resolution stopwatch maintained by style set
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsITimeRecorder> watch = do_QueryInterface(mStyleSet, &rv);
|
||||
if (NS_SUCCEEDED(rv) && watch) {
|
||||
watch->StopTimer(NS_TIMER_STYLE_RESOLUTION);
|
||||
printf("Style resolution time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Style resolution time: "));
|
||||
watch->PrintTimer(NS_TIMER_STYLE_RESOLUTION);
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
|
||||
@@ -1718,9 +1718,9 @@ HTMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
|
||||
// NRA Dump stopwatch stop info here
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
NS_STOP_STOPWATCH(mWatch)
|
||||
printf("Content creation time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Content creation time: "));
|
||||
mWatch.Print();
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
#endif
|
||||
|
||||
if (nsnull == mTitle) {
|
||||
|
||||
@@ -940,9 +940,9 @@ nsresult nsParser::ResumeParse(nsIDTD* aDefaultDTD, PRBool aIsFinalChunk) {
|
||||
// mTotalTime.Print();
|
||||
// printf("\n");
|
||||
|
||||
printf("Parse Time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Parse Time: "));
|
||||
mParseTime.Print();
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
|
||||
#endif
|
||||
return mInternalState;
|
||||
|
||||
@@ -2095,7 +2095,7 @@ nsWebShell::DoLoadURL(nsIURI * aUri,
|
||||
nsresult rv = NS_OK;
|
||||
rv = aUri->GetSpec(&url);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
printf("*** Timing layout processes on url: '%s'\n", url);
|
||||
RAPTOR_STOPWATCH_TRACE(("*** Timing layout processes on url: '%s'\n", url));
|
||||
delete [] url;
|
||||
}
|
||||
}
|
||||
@@ -3356,9 +3356,9 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
{
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
NS_STOP_STOPWATCH(mTotalTime)
|
||||
printf("Total Layout+Load Time: ");
|
||||
RAPTOR_STOPWATCH_TRACE(("Total (Layout + Page Load) Time: "));
|
||||
mTotalTime.Print();
|
||||
printf("\n");
|
||||
RAPTOR_STOPWATCH_TRACE(("\n"));
|
||||
#endif
|
||||
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user