Clojure 音色宏';p';can';无法解析,但可以解析其他音色宏
每当我试图在函数中包含一个TimbreClojure 音色宏';p';can';无法解析,但可以解析其他音色宏,clojure,profiling,timbre,Clojure,Profiling,Timbre,每当我试图在函数中包含一个Timbrep语句时,我都会得到一个错误: project.clj (defproject sketch "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" :url "http://www.ec
p
语句时,我都会得到一个错误:
project.clj
(defproject sketch "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[com.taoensso/timbre "3.1.1"]])
(ns user (:require [taoensso.timbre :as timbre]))
(timbre/refer-timbre)
(defn tst [a]
(p :tf (+ a a)))
core.clj
(defproject sketch "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[com.taoensso/timbre "3.1.1"]])
(ns user (:require [taoensso.timbre :as timbre]))
(timbre/refer-timbre)
(defn tst [a]
(p :tf (+ a a)))
产量(苹果酒/nrepl)
但是其他音色函数/宏,如
profile
和spy
工作正常。对于p
评测宏,文档似乎已经过时
(require
'[taoensso.timbre.profiling :as profiling :refer (pspy pspy* profile defnp)])
正如,p
只是pspy
(defmacro p [id & body] `(pspy ~id ~@body)) ; Alias
因此,您可以使用pspy。如果您只是对开发函数所花的时间感兴趣,就足够了
(时间(一些工作))
案例关闭!,谢谢也许值得注意的是:1。分析不适用于CLJS2。分析转移到一个新项目,3。tufte版本2.0.1