Cleaned up profiling table display.

This commit is contained in:
Peter Taoussanis 2012-07-03 16:54:15 +07:00
parent aa531901ea
commit bf7c9ff0f6
1 changed files with 3 additions and 3 deletions

View File

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