mirror of https://github.com/status-im/timbre.git
Cleaned up profiling table display.
This commit is contained in:
parent
aa531901ea
commit
bf7c9ff0f6
|
@ -43,7 +43,7 @@
|
||||||
(let [grand-total-time (reduce + (map :total (vals stats)))
|
(let [grand-total-time (reduce + (map :total (vals stats)))
|
||||||
max-name-width (apply max (map (comp count str)
|
max-name-width (apply max (map (comp count str)
|
||||||
(conj (keys stats) "Event")))
|
(conj (keys stats) "Event")))
|
||||||
pattern (str " %" max-name-width "s %6d %9s %10s %9s %7d %1s%n")
|
pattern (str "%" max-name-width "s %6d %9s %10s %9s %7d %1s%n")
|
||||||
s-pattern (.replace pattern \d \s)
|
s-pattern (.replace pattern \d \s)
|
||||||
|
|
||||||
ft (fn [nanosecs]
|
ft (fn [nanosecs]
|
||||||
|
@ -93,8 +93,8 @@
|
||||||
(fn [name# stats#]
|
(fn [name# stats#]
|
||||||
(timbre/log* ~level
|
(timbre/log* ~level
|
||||||
{:profile-stats stats#}
|
{:profile-stats stats#}
|
||||||
(str "Profiling table: " (fqname name#))
|
(str "Profiling: " (fqname name#))
|
||||||
(plog-table stats#)))
|
(str "\n" (plog-table stats#))))
|
||||||
~name
|
~name
|
||||||
~@body)
|
~@body)
|
||||||
(do ~@body)))
|
(do ~@body)))
|
||||||
|
|
Loading…
Reference in New Issue