On Sunday, 5 October 2014, Fluid Dynamics <a2093...@trbvm.com> wrote:

> On Sunday, October 5, 2014 3:57:37 PM UTC-4, Gary Verhaegen wrote:
>>
>> When I need to profile (which is asmittedly quite rare), I use VisualVM,
>> which should have been installed along with the JDK. I'd recommend editing
>> the default settings to remove clojure.** and add your own namespaces as
>> starting points for the profiling.
>>
>> For more lightweight approaches, I'd suggest checking out Timbre and
>> Criterium, though I have very little experience with both.
>>
>>
>> None of this is Eclipse specific or runs in Eclipse.
>>
>
> So, what you're saying is that I'd have to
>
> 1) Package everything up
> 2) Deploy to somewhere
> 3) Learn how to use <insert new, complicated tool here that requires
> classpath configuration and stuff>
> 4) Identify hot spots
> 5) Make improvement of some sort
> 6) Back to step 1?
>
> Because that seems to *completely eliminate* the benefit of having a REPL
> and fast development/try things/edit cycle. :(
>
> Meanwhile, why did I get google results for a supposed "Profiling and
> Logging perspective" in Eclipse if no such thing exists?
>

No, I was not saying anything like that. My message was perhaps a bit
terse, so here are a few more details.

* VisualVM, as others have pointed out, is a very easy to use, graphical
profiling tool distributed by Oracle as part of the JDK (some Linux distros
have a separate package for it). It is an executable that requires no
classpath mucking and is completely external to your application (no
classpath, bo dependencies, etc.). Once it opens, it lists all of the
currently running JVMs on your machine, which should include your REPL, and
can connect to them and start profiling without any modification on your
code or workflow. It does require some dynamic bytecode modifications which
take some time, and it does make your code run a bit slower. It is the
easiest approach I know of for a one time, hit and run kind of profiling.

* Criterium is a microbenchmarking library. You can use it to run some
benchmarks from you REPL for targeted profiling, but you can also integrate
it into your test suite and collect historical results from your
build/integration system. It can also return its results as data so you can
actually test your performance (although if done naively this can lead to
very fragile tests that depend on the computer they are running on and its
current load).

* Timbre is a logging library, which also has features to colloect
performance metrics on your running application. This may be more in the
monitoring space than the profiling one, but it is nonetheless related and
interesting to know about as an option. (It is meant to collect these
metrics in production.)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to