mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
Restore performance measuring lines
This commit is contained in:
parent
4a329a6318
commit
4fc7efd3b7
1 changed files with 6 additions and 6 deletions
|
@ -53,7 +53,7 @@
|
|||
"Resolves references and math expressions using StyleDictionary.
|
||||
Returns a promise with the resolved dictionary."
|
||||
[tokens & {:keys [debug?] :as config}]
|
||||
(let [#_#_performance-start (js/window.performance.now)
|
||||
(let [performance-start (js/performance.now)
|
||||
sd (tokens->style-dictionary+ tokens config)]
|
||||
(when debug?
|
||||
(js/console.log "StyleDictionary" sd))
|
||||
|
@ -61,12 +61,12 @@
|
|||
(.buildAllPlatforms "json")
|
||||
(.catch js/console.error)
|
||||
(.then (fn [^js resp]
|
||||
(let [#_#_performance-end (js/window.performance.now)
|
||||
#_#_duration-ms (- performance-end performance-start)
|
||||
(let [performance-end (js/performance.now)
|
||||
duration-ms (- performance-end performance-start)
|
||||
resolved-tokens (.-allTokens resp)]
|
||||
#_(when debug?
|
||||
(js/console.log "Time elapsed" duration-ms "ms")
|
||||
(js/console.log "Resolved tokens" resolved-tokens))
|
||||
(when debug?
|
||||
(js/console.log "Time elapsed" duration-ms "ms")
|
||||
(js/console.log "Resolved tokens" resolved-tokens))
|
||||
resolved-tokens))))))
|
||||
|
||||
(defn humanize-errors [{:keys [errors value] :as _token}]
|
||||
|
|
Loading…
Reference in a new issue