groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Johnson <john...@cs.uiuc.edu>
Subject Re: problems with GProf
Date Sat, 16 May 2015 01:43:05 GMT
It looked at the source for GProf and it was not hard to find the problem.
  It was apparently compiled assuming Java 1.7 and I am still using 1.6.
I needed to change the method is used do compare Longs, and then it worked.

I was impressed with the output of GProf.  It showed me just what I needed.
  The output comes in two parts, a "flat file" and a call graph.   The flat
file tells how many times each method was called and how much time was
spent in it.   The call graph is supposed to tell you how the program got
to those methods.  The flat file is easy for me to understand and use, but
the call graph is harder to interpret and I wonder whether there is a bug
in it, because it isn't quite what I expect.  It is possible that my
program is a bit bigger than it was designed for.

On Fri, May 15, 2015 at 8:38 AM, Ralph Johnson <johnson@cs.uiuc.edu> wrote:

> I really need to profile my program, and the Java profilers I've tried in
> the past with Groovy were not very helpful.   So, I was happy to see GProf
> and thought I would try it out.
>
> The documentation doesn't tell you what you need to import to set it up.
>
> I decided that I needed to import groovyx.gprof.ProfileStaticExtension
>
> I tried the profile { ...}.prettyPrint() syntax that the example used, and
> the profile seemed to be run, but the pretttyprint failed when it tried to
> sort the output with a no such method error for java.lang.Long.compare(JJ).
>    That seemed an odd sort of error unless I am using the wrong version of
> the package, and I am pretty sure I am using the right one (I am using
> groovy 2.1.6)  I'm using Eclipse, and we are not using a separate build
> system like ant but just using the regular Eclipse build system.
>
> Has anybody out there used GProf and can advise me?
>
> -Ralph Johnson
>

Mime
View raw message