Re: probem with DNS resolution timing

2002-05-03 Thread Dan Mosedale

[2nd try, reposting to .netlib; perhaps someone there can help]

[EMAIL PROTECTED] (masqurin) writes:
> Hello,
> 
> While I was trying to add some code to time events such as DNS resolution in
> Mozilla,
> I found the folowing code (in the file nsDnsService.cpp):
> 
> #ifdef DNS_TIMING
> if (getenv("DNS_TIMING")) {
> mOut = fopen("dns-timing.txt", "a");
> if (mOut) {
> PRTime now = PR_Now();
> PRExplodedTime time;
> PR_ExplodeTime(now, PR_LocalTimeParameters, &time);
> char buf[128];
> PR_FormatTimeUSEnglish(buf, sizeof(buf), "%c", &time);
> fprintf(mOut, "### DNS starting new run: %s\n",
> buf);
> }
> }
> #endif
> 
> At first I was happy, because it seemed to be close to what I needed.
> So I set MOZ_DEBUG=1 and DNS_TIMING=1, and I compiled a new Mozilla.
> 
> Halas this one crashes at start. Win 2000 Pop's an error message up
> saying that some memory address can't be read.
> 
> Did I miss some thing ? Is there a list of the things that can be timed
> without any modification of the code ?
> 
> Thanks!
> 
> 






Re: probem with DNS resolution timing

2002-05-03 Thread Dan Mosedale

[Reposting to n.p.m.netlib]

[EMAIL PROTECTED] (masqurin) writes:
> Hello,
> 
> While I was trying to add some code to time events such as DNS resolution in
> Mozilla,
> I found the folowing code (in the file nsDnsService.cpp):
> 
> #ifdef DNS_TIMING
> if (getenv("DNS_TIMING")) {
> mOut = fopen("dns-timing.txt", "a");
> if (mOut) {
> PRTime now = PR_Now();
> PRExplodedTime time;
> PR_ExplodeTime(now, PR_LocalTimeParameters, &time);
> char buf[128];
> PR_FormatTimeUSEnglish(buf, sizeof(buf), "%c", &time);
> fprintf(mOut, "### DNS starting new run: %s\n",
> buf);
> }
> }
> #endif
> 
> At first I was happy, because it seemed to be close to what I needed.
> So I set MOZ_DEBUG=1 and DNS_TIMING=1, and I compiled a new Mozilla.
> 
> Halas this one crashes at start. Win 2000 Pop's an error message up
> saying that some memory address can't be read.
> 
> Did I miss some thing ? Is there a list of the things that can be timed
> without any modification of the code ?




probem with DNS resolution timing

2002-05-03 Thread masqurin

Hello,

While I was trying to add some code to time events such as DNS resolution in
Mozilla,
I found the folowing code (in the file nsDnsService.cpp):

#ifdef DNS_TIMING
if (getenv("DNS_TIMING")) {
mOut = fopen("dns-timing.txt", "a");
if (mOut) {
PRTime now = PR_Now();
PRExplodedTime time;
PR_ExplodeTime(now, PR_LocalTimeParameters, &time);
char buf[128];
PR_FormatTimeUSEnglish(buf, sizeof(buf), "%c", &time);
fprintf(mOut, "### DNS starting new run: %s\n",
buf);
}
}
#endif

At first I was happy, because it seemed to be close to what I needed.
So I set MOZ_DEBUG=1 and DNS_TIMING=1, and I compiled a new Mozilla.

Halas this one crashes at start. Win 2000 Pop's an error message up
saying that some memory address can't be read.

Did I miss some thing ? Is there a list of the things that can be timed
without any modification of the code ?

Thanks!