Last active
March 23, 2019 13:21
-
-
Save yyoncho/9e9c4e14734fdd9a22d6600a88a27ae1 to your computer and use it in GitHub Desktop.
Performance testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defconst json-string | |
(with-temp-buffer | |
(insert-file-contents-literally "/home/kyoncho/Public/Desktop/large.json") | |
(buffer-string))) | |
(progn | |
(setq my/call-counter 0) | |
(defun my/test-query-function (&rest args) | |
(incf my/call-counter) | |
t) | |
(add-hook 'kill-buffer-query-functions #'my/test-query-function) | |
(json-parse-string json-string) | |
my/call-counter) ;; => 32982 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment