]> code.delx.au - gnu-emacs-elpa/commitdiff
More benchmark improvements.
authorJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Sun, 23 Nov 2014 21:14:27 +0000 (13:14 -0800)
committerJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Sun, 23 Nov 2014 21:14:27 +0000 (13:14 -0800)
Makefile
benchmark/context-coloring-benchmark.el

index 656a035d6e217db2df7d0745fdef6a2efcbe5bea..58aac73d1c32735a4ad2743b679abb0a6c76c871 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
 all: clean install compile test
 
+bench: benchjs benchel
+
 benchjs:
        node_modules/.bin/matcha
 
@@ -13,8 +15,7 @@ compile:
        emacs -Q -batch -f batch-byte-compile *.el
 
 clean:
-       rm -rf node_modules
-       rm *.elc
+       rm -f *.log benchmark/*.log *.elc
 
 install:
        npm install
@@ -27,4 +28,4 @@ test:
        -l test/context-coloring-test.el \
        -f ert-run-tests-batch-and-exit
 
-.PHONY: all benchjs benchel compile clean install test
+.PHONY: all bench benchjs benchel compile clean install test
index 5476847a1496d0bda8efda34021b6e6814a39c8a..e7b5b8b5d881acb988259b5e41d515e491e44ef5 100644 (file)
@@ -15,7 +15,9 @@
 
 (defun context-coloring-benchmark-run ()
   (context-coloring-benchmark-setup)
-  (let ((result-file (context-coloring-benchmark-resolve-path (concat "./results.log"))))
+
+  (let ((result-file (context-coloring-benchmark-resolve-path
+                      (concat "./results-" (format-time-string "%s") ".log"))))
 
     (dolist (path '("./fixtures/jquery-2.1.1.js"
                     "./fixtures/lodash-2.4.1.js"
@@ -40,8 +42,7 @@
             (insert "\n")
             (append-to-buffer results-buffer (point-min) (point-max))))
 
-        (append-to-file nil nil result-file)))
-
-    (find-file result-file))
+        (append-to-file nil nil result-file))))
 
-  (context-coloring-benchmark-teardown))
+  (context-coloring-benchmark-teardown)
+  (kill-emacs))