Hi all - I've landed some cleanup/formatting changes for the msgcompose:5 variable's logfile output:
* It now displays in seconds, instead of milliseconds (but rounds
accurately just as you would report the numbers officially).
* General cleanup, especially labeling the delta time, total time, etc.
It's not automatic, if you'd like to enable it, follow these instructions:
For all platforms, you'll need to edit your prefs.js file in your user
directory (make sure you do this when Mozilla isn't running):
Add this line in:
user_pref("mailnews.logComposePerformance", true);
Then, follow these instructions for each platform:
Windows 95/98: Create "c:\tmp" for the log file to reside in if
the directory does not exist. Insert the following lines into your
autoexec.bat file:
Set NSPR_LOG_MODULES=msgcompose:5
Set NSPR_LOG_FILE=c:\tmp\[filename]
The filename can be defined by you. Reboot.
WinNT: Use the Control Panel | System | Environment tool to set the
PRLOG env variables.
Variables: NSPR_LOG_MODULES Value: msgcompose:5
Variables: NSPR_LOG_FILE Value: c:\tmp\[filename]
Follow the remaining steps for Windows 95/98 above.
Mac: Create a text file that contains the desired commands in a text
editor such as BBEdit:
ARGS: -mail
ENV:NSPR_LOG_MODULES=msgcompose:5
ENV:NSPR_LOG_FILE=[filename]
The filename can be defined by you. Save this file and drag and
drop this file on the Netscape/Mozilla application icon. The
log file is created in the seamonkey folder.
Unix (e.g., for csh shells): Add the following lines to ~/.cshrc
file of the csh shell:
setenv NSPR_LOG_MODULES msgcompose:5
setenv NSPR_LOG_FILE /u/[unix userlogin]/tmp/[filename]
The filename can be defined by you.
- Stephen
http://bugzilla.mozilla.org/show_bug.cgi?id=99580
Title: Bug 99580 - Various cleanup ideas for msgcompose:5 logging.
|
This is Bugzilla: the Mozilla bug system. For more information about what Bugzilla is and what it can do, see mozilla.org's bug pages.
Additional Comments: Leave as RESOLVED FIXED Reopen bug Mark bug as VERIFIED Mark bug as CLOSED
View Bug Activity
|
Format For Printing
Here is a sample current log, with *my* comments as C++ style comments: 0[a3deb0c]: // before we do the seperator below, we should make columns like "[process]: [total milliseconds] [function time in milliseconds]" -------------------- 0[a3deb0c]: [ 0][ 0] - Start opening the window, message size = 22518 // we should list the above '22518' bytes in kilobytes, I think 0[a3deb0c]: [ 1515][ 1515] - Start Initializing the compose window (ComposeLoad) 0[a3deb0c]: [ 2364][ 849] - Done with the initialization (ComposeLoad). Waiting on editor to load about::blank 0[a3deb0c]: [ 2618][ 254] - Editor is done loading about::blank. Now let mime do its job // about: blank is 'new window time', so we should comment to that effect 0[a3deb0c]: [ 3509][ 891] - done with mime. Time to insert the body 0[a3deb0c]: [ 3852][ 343] - Finished inserting data into the editor. The window is almost ready! 0[a3deb0c]: [ 4644][ 792] - addressing widget, windows title and focus are now set. The window is finally ready ------- Additional Comment #1 From Stephen Donner 2001-09-14 01:10 ------- I should have a patch for this very soon. ------- Additional Comment #2 From Stephen Donner 2001-09-14 15:00 ------- Created an attachment (id=49387) Cleans up formatting a tiny bit ------- Additional Comment #3 From Stephen Donner 2001-09-14 15:01 ------- Created an attachment (id=49388) Sample output so far ------- Additional Comment #4 From Stephen Donner 2001-09-14 15:07 ------- The 2 things remaining that I'll need help with are: 1. Either get rid of the process at the top of the output or get rid of it on the left side of each output line. We only need to know the process once, since running multiple windows or replies starts the output on a new line \n and one process ID per output module is fine. 2. I really would like the milliseconds to be output instead in seconds. Instead of rounding, we should just do: 1234 (in ms) would become 1.23 seconds. And I'd like to see that logged as: [ 12.7][ 0.064] - Done with the initialization (ComposeLoad). Waiting on editor to load about:blank ------- Additional Comment #5 From Stephen Donner 2001-09-14 15:08 ------- I meant this line: 0[324410]: [ 1275][ 64] - Done with the initialization (ComposeLoad). Waiting on editor to load about:blank ------- Additional Comment #6 From Stephen Donner 2001-09-14 15:09 ------- Typo, I meant: it would become: [ 1.274][ 0.064] - Done with the initialization (ComposeLoad). Waiting on editor to load about:blank ------- Additional Comment #7 From Sheela Ravindran 2001-12-14 15:34 ------- Stephen, Is this fixed or still not complete? ------- Additional Comment #8 From Stephen Donner 2001-12-14 15:39 ------- Sheela, nope, not yet. Jean-Francois, do you object to anything in my patch? ------- Additional Comment #9 From Jean-Francois Ducarroz 2001-12-14 15:54 ------- (From update of attachment 49387) be award than "This is new window time" is in fact the time for a new msg compose window! it's a little bit more than a new window time in the generic sense of it. R=ducarroz ------- Additional Comment #10 From Jean-Francois Ducarroz 2001-12-14 16:00 ------- if you want ot display the time in sec rather than millisec, change the line:
PR_LOG(MsgComposeLogModule, PR_LOG_ALWAYS, ("[%5d][%5d] - %s\n", totalTime,
deltaTime, label));
to
PR_LOG(MsgComposeLogModule, PR_LOG_ALWAYS, ("[%3.2f][%3.2f] - %s\n",
(double)totalTime/100.0, (double)deltaTime/100.0, label));
same for the printf line above and you might have to add a column in the header.
You are welcom to reassign this bug to yourself
------- Additional Comment #11 From Stephen Donner 2001-12-16 21:37 ------- Jean-Francois, can you help me declare the variables in C++? I only know JS: c:\moz_src\mozilla\mailnews\compose\src\nsMsgComposeService.cpp(531) : error C2065: 'totalTime' : undeclared identifier c:\moz_src\mozilla\mailnews\compose\src\nsMsgComposeService.cpp(531) : error C2065: 'deltaTime' : undeclared identifier ------- Additional Comment #12 From Jean-Francois Ducarroz 2001-12-17 11:53 ------- Reassign to stephen. Seems a good exercise for him... ------- Additional Comment #13 From Stephen Donner 2001-12-20 12:36 ------- Created an attachment (id=62400) Patch V2.0 ------- Additional Comment #14 From Stephen Donner 2001-12-20 12:37 ------- New sample output 0[324470]: [process]: [totalTime][deltaTime] -------------------- 0[324470]: [0.01][0.01] - Start opening the window, message size = 1361 0[324470]: [0.80][0.80] - Start initializing the compose window (ComposeLoad) 0[324470]: [0.84][0.05] - Done with the initialization (ComposeLoad). Waiting on editor to load about:blank 0[324470]: [0.94][0.10] - Editor is done loading about:blank. This is New Compose window time. Time for MIME. 0[324470]: [0.96][0.03] - Done with MIME. Now we're updating the UI elements 0[324470]: [1.06][0.10] - Addressing widget, window title and focus are now set, time to insert the body 0[324470]: [1.11][0.06] - Finished inserting data into the editor. The window is finally ready! ------- Additional Comment #15 From Stephen Donner 2001-12-20 12:38 ------- Jean-Francois, I think with your help yesterday, that this is ready to go. Can I get another r=? Thanks. ------- Additional Comment #16 From Jean-Francois Ducarroz 2001-12-20 21:22 ------- (From update of attachment 62400) R=ducarroz ------- Additional Comment #17 From [EMAIL PROTECTED] 2001-12-21 14:06 ------- (From update of attachment 62400) sr=mscott ------- Additional Comment #18 From Stephen Donner 2001-12-30 16:29 ------- C:\moz_src\mozilla\mailnews\compose\src>cvs commit -m " Bug List: (8 of 9) First Last Prev Next Show list Query page Enter new bug
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
