]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/context-coloring/context-coloring-benchmark.el
Merge commit '3007b2917d71a7d66eb94876536dfd80b0661d40' from context-coloring
[gnu-emacs-elpa] / packages / context-coloring / context-coloring-benchmark.el
similarity index 91%
rename from packages/context-coloring/benchmark/context-coloring-benchmark.el
rename to packages/context-coloring/context-coloring-benchmark.el
index c627249b31ff22ecc3db01b6b9965320ce608b03..0c38e85421da4705c98928c39ad44323cf29087c 100644 (file)
@@ -1,6 +1,6 @@
-;;; context-coloring-benchmark.el --- Benchmarks for context coloring  -*- lexical-binding: t; -*-
+;;; context-coloring-benchmark.el --- Benchmarks for context coloring  -*- lexical-binding: t; no-byte-compile: t; -*-
 
-;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2014-2016  Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -26,8 +26,9 @@
 ;;; Code:
 
 (require 'context-coloring)
+(require 'context-coloring-javascript)
+(require 'context-coloring-emacs-lisp)
 (require 'elp)
-(require 'js2-mode)
 
 
 (defconst context-coloring-benchmark-path
@@ -45,7 +46,7 @@
                        (elp-results)
                        (buffer-substring-no-properties (point-min) (point-max)))
                    (kill-buffer))))
-    (make-directory (context-coloring-benchmark-resolve-path "./logs") t)
+    (make-directory (context-coloring-benchmark-resolve-path "./benchmark") t)
     (append-to-file
      (with-temp-buffer
        (goto-char (point-min))
@@ -73,7 +74,7 @@
 (defun context-coloring-benchmark (title fixtures)
   "Execute a benchmark titled TITLE against FIXTURES."
   (let ((result-file (context-coloring-benchmark-resolve-path
-                      (format "./logs/results-%s-%s.log"
+                      (format "./benchmark/results-%s-%s.log"
                               title (format-time-string "%s")))))
     (mapc
      (lambda (path)
      fixtures)))
 
 (defconst context-coloring-benchmark-javascript-fixtures
-  '("./fixtures/jquery-2.1.1.js"
-    "./fixtures/lodash-2.4.1.js"
-    "./fixtures/async-0.9.0.js"
-    "./fixtures/mkdirp-0.5.0.js")
+  '("./fixtures/benchmark/jquery-2.1.1.js"
+    "./fixtures/benchmark/lodash-2.4.1.js"
+    "./fixtures/benchmark/async-0.9.0.js"
+    "./fixtures/benchmark/mkdirp-0.5.0.js")
   "Arbitrary JavaScript files for performance scrutiny.")
 
 (defun context-coloring-benchmark-js2-mode-run ()
   (remove-hook 'js2-mode-hook #'context-coloring-mode))
 
 (defconst context-coloring-benchmark-emacs-lisp-fixtures
-  '("./fixtures/lisp.el"
-    "./fixtures/faces.el"
-    "./fixtures/subr.el"
-    "./fixtures/simple.el")
+  '("./fixtures/benchmark/lisp.el"
+    "./fixtures/benchmark/faces.el"
+    "./fixtures/benchmark/subr.el"
+    "./fixtures/benchmark/simple.el")
   "Arbitrary Emacs Lisp files for performance scrutiny.")
 
 (defun context-coloring-benchmark-emacs-lisp-mode-run ()