RE: Perl Profiler?

2002-10-07 Thread Nikola Janceski

There is no magic in programming, just ones and zeros.

but I am sure others have the same question as me...

What the heck is a Profiler? Where have you seen one before?

> -Original Message-
> From: Jason Frisvold [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 07, 2002 2:24 PM
> To: beginners perl
> Subject: Perl Profiler?
> 
> 
> Does anyone know if there is a Perl Profiler (Open Source or 
> Commercial)
> that is in existance?  Apparently my boss thinks this will 
> magically fix
> various issues...  :)
> 
> -- 
> ---
> Jason 'XenoPhage' Frisvold
> Senior ATM Engineer
> Penteledata Engineering
> [EMAIL PROTECTED]
> RedHat Certified - RHCE # 807302349405893
> ---
> "Something mysterious is formed, born in the silent void. 
> Waiting alone
> and unmoving, it is at once still and yet in constant motion. 
> It is the
> source of all programs. I do not know its name, so I will call it the
> Tao of Programming."
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Perl Profiler?

2002-10-07 Thread George Schlossnagle

perldoc Devel::DProf

It's a very useful and functional profiler (IMHO).

George


Jason Frisvold wrote:

>Does anyone know if there is a Perl Profiler (Open Source or Commercial)
>that is in existance?  Apparently my boss thinks this will magically fix
>various issues...  :)
>




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Perl Profiler?

2002-10-07 Thread Jason Frisvold

Thanks, I'm looking into it now...  :)

We were specifically wondering if there was something that could count
loops, count db calls, and related items like that ...  It looks like
this profiler will tell you the time spent in subroutines, but not more
specifics?  Of course, I need to do more reading on this ... looks like
it may do a lot more than meets the eye ...  :)

Friz

On Mon, 2002-10-07 at 14:31, George Schlossnagle wrote:
> perldoc Devel::DProf
> 
> It's a very useful and functional profiler (IMHO).
> 
> George
> 
> 
> Jason Frisvold wrote:
> 
> >Does anyone know if there is a Perl Profiler (Open Source or Commercial)
> >that is in existance?  Apparently my boss thinks this will magically fix
> >various issues...  :)
> >
> 
> 
> 
-- 
---
Jason 'XenoPhage' Frisvold
Senior ATM Engineer
Penteledata Engineering
[EMAIL PROTECTED]
RedHat Certified - RHCE # 807302349405893
---
"Something mysterious is formed, born in the silent void. Waiting alone
and unmoving, it is at once still and yet in constant motion. It is the
source of all programs. I do not know its name, so I will call it the
Tao of Programming."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Perl Profiler?

2002-10-07 Thread Jason Frisvold

A profiler is basically a program that watches another program run and
outputs information on how long it ran, uses of variables, memory
accesses, looping information, etc.  It can be really helpful when
you're trying to figure out where the bottleneck in a particular program
is...  It can also teach you to write tighter code since you learn from
your mistakes :)

Friz

On Mon, 2002-10-07 at 14:26, Nikola Janceski wrote:
> There is no magic in programming, just ones and zeros.
> 
> but I am sure others have the same question as me...
> 
> What the heck is a Profiler? Where have you seen one before?
> 
> > -Original Message-
> > From: Jason Frisvold [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 07, 2002 2:24 PM
> > To: beginners perl
> > Subject: Perl Profiler?
> > 
> > 
> > Does anyone know if there is a Perl Profiler (Open Source or 
> > Commercial)
> > that is in existance?  Apparently my boss thinks this will 
> > magically fix
> > various issues...  :)
> > 
> > -- 
> > ---
> > Jason 'XenoPhage' Frisvold
> > Senior ATM Engineer
> > Penteledata Engineering
> > [EMAIL PROTECTED]
> > RedHat Certified - RHCE # 807302349405893
> > ---
> > "Something mysterious is formed, born in the silent void. 
> > Waiting alone
> > and unmoving, it is at once still and yet in constant motion. 
> > It is the
> > source of all programs. I do not know its name, so I will call it the
> > Tao of Programming."
> > 
> > 
> > -- 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> 
> The views and opinions expressed in this email message are the sender's
> own, and do not necessarily represent the views and opinions of Summit
> Systems Inc.
> 
-- 
---
Jason 'XenoPhage' Frisvold
Senior ATM Engineer
Penteledata Engineering
[EMAIL PROTECTED]
RedHat Certified - RHCE # 807302349405893
---
"Something mysterious is formed, born in the silent void. Waiting alone
and unmoving, it is at once still and yet in constant motion. It is the
source of all programs. I do not know its name, so I will call it the
Tao of Programming."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Perl Profiler?

2002-10-07 Thread George Schlossnagle

It can tell you all these things, you just need to massage it correctly, 
and know your app well enough to associate subroutine names with 
implementations.   (you should read the man page for dprofpp as well, 
that's the DProf profile parser which allows you to interperet your 
trace files.  For (potentially excessive) detail, use the -t  option to 
get a compacted call tree.  That combined with the summary statistics 
can give you a good feel for where time is being spent, and what the fow 
of the application is.

One note of caution:  DProf exects your application to exit naturally. 
 If this is a daemonizing app that is not suppsoed to exit, you may want 
to wrap it so that it can run for a set period of time and then exit. 
 Otherwise you may have probles with your statistics.

George


Jason Frisvold wrote:

>Thanks, I'm looking into it now...  :)
>
>We were specifically wondering if there was something that could count
>loops, count db calls, and related items like that ...  It looks like
>this profiler will tell you the time spent in subroutines, but not more
>specifics?  Of course, I need to do more reading on this ... looks like
>it may do a lot more than meets the eye ...  :)
>
>Friz
>
>On Mon, 2002-10-07 at 14:31, George Schlossnagle wrote:
>
>>perldoc Devel::DProf
>>
>>It's a very useful and functional profiler (IMHO).
>>
>>George
>>
>>
>>Jason Frisvold wrote:
>>
>>>Does anyone know if there is a Perl Profiler (Open Source or Commercial)
>>>that is in existance?  Apparently my boss thinks this will magically fix
>>>various issues...  :)
>>>
>>
>>




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Perl Profiler?

2002-10-07 Thread James Edward Gray II

On Monday, October 7, 2002, at 01:26  PM, Nikola Janceski wrote:

> There is no magic in programming, just ones and zeros.

Sure there is, in Perl especially!  ;)

magic - Technically speaking, any extra semantics attached to a 
variable such as $!, $0, %ENV, or %SIG, or to any tied variable.  
Magical things happen when you diddle those variables.  (from 
Programming Perl's glossary)

James


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Perl Profiler?

2002-10-07 Thread Ovid

--- Jason Frisvold <[EMAIL PROTECTED]> wrote:
> Does anyone know if there is a Perl Profiler (Open Source or Commercial)
> that is in existance?  Apparently my boss thinks this will magically fix
> various issues...  :)

Perl has many tools for this.  However, profiling tools are generally used to determine
performance issues.  If performance is not a problem, they're not terribly relevant.  
Assuming
that performance *is* a problem, here's a general strategy.

Use Devel::Dprof

This module allows you to know the execution time of a script and its subroutines.  
Read 'perldoc
Devel::Dprof' and http://perlmonks.org/index.pl?node_id=101786 for more information.

When you have determined where you might get the most performance enhancements, you 
can switch to
Devel::SmallProf to measure performance on a line-by-line basis.

Finally, when determining what code changes will gain you maximum benefit, using the 
Benchmark
module will allow you to concretely demonstrate what *really* works.  For some good 
information on
using Benchmark, see http://perlmonks.org/index.pl?node_id=8745

Cheers,
Ovid

=
"Ovid" on http://www.perlmonks.org/
Someone asked me how to count to 10 in Perl:
push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Perl Profiler?

2002-10-07 Thread Paul Johnson

On Mon, Oct 07, 2002 at 02:37:13PM -0400, Jason Frisvold wrote:

> Thanks, I'm looking into it now...  :)
> 
> We were specifically wondering if there was something that could count
> loops, count db calls, and related items like that ...  It looks like
> this profiler will tell you the time spent in subroutines, but not more
> specifics?  Of course, I need to do more reading on this ... looks like
> it may do a lot more than meets the eye ...  :)

If you are not afraid of alpha code you could take a peek at
Devel::Cover.  Providing this information is not its primary purpose,
but it might help.  Or it might hinder ...

> On Mon, 2002-10-07 at 14:31, George Schlossnagle wrote:
> > perldoc Devel::DProf
> > 
> > It's a very useful and functional profiler (IMHO).
> > 
> > George
> > 
> > 
> > Jason Frisvold wrote:
> > 
> > >Does anyone know if there is a Perl Profiler (Open Source or Commercial)
> > >that is in existance?  Apparently my boss thinks this will magically fix
> > >various issues...  :)
> > >
> > 
> > 
> > 
> -- 
> ---
> Jason 'XenoPhage' Frisvold
> Senior ATM Engineer
> Penteledata Engineering
> [EMAIL PROTECTED]
> RedHat Certified - RHCE # 807302349405893
> ---
> "Something mysterious is formed, born in the silent void. Waiting alone
> and unmoving, it is at once still and yet in constant motion. It is the
> source of all programs. I do not know its name, so I will call it the
> Tao of Programming."
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]