emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 183ac4e 081/271: Add emacs benchmark.


From: Jackson Ray Hamilton
Subject: [elpa] master 183ac4e 081/271: Add emacs benchmark.
Date: Thu, 05 Feb 2015 18:29:56 +0000

branch: master
commit 183ac4e3ac6d77c04b9018886ef1fe6941b241ba
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>

    Add emacs benchmark.
---
 Makefile               |    5 ++++-
 benchmark/scenarios.el |   13 +++++++++++++
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 0a18abb..4a369d5 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,10 @@ test:
        node_modules/.bin/mocha
        emacs -batch -l ert -l test/context-coloring-test.el -f 
ert-run-tests-batch-and-exit
 
-benchmark:
+benchjs:
        node_modules/.bin/matcha
 
+benchel:
+       emacs -Q -l context-coloring.el -l benchmark/scenarios.el
+
 .PHONY: all test benchmark
diff --git a/benchmark/scenarios.el b/benchmark/scenarios.el
new file mode 100644
index 0000000..0a0287b
--- /dev/null
+++ b/benchmark/scenarios.el
@@ -0,0 +1,13 @@
+;; Setup
+(add-hook 'js-mode-hook 'context-coloring-mode)
+(elp-instrument-package "context-coloring-")
+
+;; Test 5 times.
+(find-file (expand-file-name
+            "./fixtures/jquery-2.1.1.js"
+            (file-name-directory (or load-file-name buffer-file-name))))
+(dotimes (n 4)
+  (sit-for 2)
+  (revert-buffer t t))
+(sit-for 2)
+(elp-results)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]