Improve init benchmarking accuracy
This commit is contained in:
parent
31fc40b63c
commit
46a82c7ab2
1 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
||||||
;;; core-packages.el
|
;;; core-packages.el
|
||||||
(defvar doom-start-time (current-time))
|
|
||||||
|
|
||||||
;; Emacs package management is opinionated. Unfortunately, so am I. So with the
|
;; Emacs package management is opinionated. Unfortunately, so am I. So with the
|
||||||
;; help of `use-package', `quelpa' and package.el, DOOM Emacs manages my
|
;; help of `use-package', `quelpa' and package.el, DOOM Emacs manages my
|
||||||
|
@ -59,6 +58,9 @@ package's name as a symbol, and whose CDR is the plist supplied to its
|
||||||
"A list of packages that must be installed (and will be auto-installed if
|
"A list of packages that must be installed (and will be auto-installed if
|
||||||
missing) and shouldn't be deleted.")
|
missing) and shouldn't be deleted.")
|
||||||
|
|
||||||
|
(defvar doom-init-time nil
|
||||||
|
"The time it took, in seconds, for DOOM Emacs to initialize.")
|
||||||
|
|
||||||
(defvar doom--base-load-path
|
(defvar doom--base-load-path
|
||||||
(append (list doom-core-dir doom-modules-dir)
|
(append (list doom-core-dir doom-modules-dir)
|
||||||
load-path)
|
load-path)
|
||||||
|
@ -247,7 +249,7 @@ Used by `@require' and `@depends-on'."
|
||||||
(defun doom--display-benchmark ()
|
(defun doom--display-benchmark ()
|
||||||
(message "Loaded %s packages in %.03fs"
|
(message "Loaded %s packages in %.03fs"
|
||||||
(- (length load-path) (length doom--base-load-path))
|
(- (length load-path) (length doom--base-load-path))
|
||||||
(float-time (time-subtract nil doom-start-time))))
|
(setq doom-init-time (float-time (time-subtract after-init-time before-init-time)))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue