You are running clojure 1.3 or greater with the pre-1.3 contrib.

Since 1.3, contrib has been split in separate libs, you can find where the
different parts have moved here;

http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

The profiling stuff did not make it it seems. A java profiler would be your 
best bet.

There is a 1.3 compatible monolithic contrib out there but I would not bundle it
as a standard dependency. The new libs are moving forward faster now that they
can be delivered individually.

Luc


> Hi All
> 
> I'm trying to run the clojure contrib profiler and I'm getting an error. 
>  Has anyone faced the same problem?
> 
> user=> (use 'clojure.contrib.profile)
> nil
> user=> (defn my-function [x y]
>                 (let [sum (prof :addition (+ x y))
>                       product (prof :multiplication (* x y))]
>                   [sum product]))
> #'user/my-function
> user=> (profile (dotimes [i 10000] (my-function 3 4)))
> IllegalStateException Can't dynamically bind non-dynamic var: 
> clojure.contrib.profile/*profile-data*  clojure.lang.Var.pushThreadBindings 
> (Var.java:353)
> 
> user=> *enable-profiling*
> true
> 
> 
> 
> my project.clj looks like this
> 
> (defproject clam "0.1.0-SNAPSHOT"
>   :description "Data description language for parsing text streams"
>   :url "https://github.com/mowat27/clam";
>   :license {:name "MIT Licence"
>             :url "http://copyfree.org/licenses/mit/license.txt"}
>   :dependencies [[org.clojure/clojure "1.4.0"]
>                  [org.clojure/clojure-contrib "1.2.0"]
>                  [midje "1.4.0"]
>                  [com.stuartsierra/lazytest "1.2.3"]]
>   :repositories {"stuart" "http://stuartsierra.com/maven2"})
> 
> 
> Thanks very much
> 
> 
> Adrian
> 
> -- 
> 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
--
Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail from my ipad!

-- 
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

Reply via email to