diff options
Diffstat (limited to 'lisp/emacs-lisp/erb.el')
| -rw-r--r-- | lisp/emacs-lisp/erb.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/erb.el b/lisp/emacs-lisp/erb.el index 7d3f33dcca2..48f81a954c3 100644 --- a/lisp/emacs-lisp/erb.el +++ b/lisp/emacs-lisp/erb.el | |||
| @@ -1013,19 +1013,28 @@ system, remove it." | |||
| 1013 | 1013 | ||
| 1014 | ;;;; Run benchmarks | 1014 | ;;;; Run benchmarks |
| 1015 | 1015 | ||
| 1016 | ;; Todo UI for this | ||
| 1017 | (defvar erb-task-select-function nil | ||
| 1018 | "If non-nil, a function to select the benchmark tasks to run. | ||
| 1019 | Passed one argument, TASK, an `erb--metadata' structure. Return | ||
| 1020 | non-nil if TASK should be run.") | ||
| 1021 | |||
| 1016 | (defun erb--benchmark-one-commit (commit target-emacs) | 1022 | (defun erb--benchmark-one-commit (commit target-emacs) |
| 1017 | "Run the benchmark tasks for one COMMIT and record the results. | 1023 | "Run the benchmark tasks for one COMMIT and record the results. |
| 1018 | The executable to run should be found in the subdirectory | 1024 | The executable to run should be found in the subdirectory |
| 1019 | 'result' of the directory TARGET-EMACS." | 1025 | 'result' of the directory TARGET-EMACS." |
| 1020 | (let* ((tasks (erb--vc-tasks-for-commmit commit)) | 1026 | (let* ((tasks (erb--vc-tasks-for-commmit commit)) |
| 1027 | (selected-tasks (seq-filter (or erb-task-select-function | ||
| 1028 | #'identity) | ||
| 1029 | tasks)) | ||
| 1021 | (benchmark-task-files (directory-files-recursively | 1030 | (benchmark-task-files (directory-files-recursively |
| 1022 | (erb--benchmark-dir) "\\.el$")) | 1031 | (erb--benchmark-dir) "\\.el$")) |
| 1023 | (all-run-results (make-erb--run-results))) | 1032 | (all-run-results (make-erb--run-results))) |
| 1024 | (when tasks | 1033 | (when tasks |
| 1025 | (dolist (file benchmark-task-files) | 1034 | (dolist (file benchmark-task-files) |
| 1026 | (when-let* ((selected-tasks (erb--filter-by-file tasks file))) | 1035 | (when-let* ((file-tasks (erb--filter-by-file selected-tasks file))) |
| 1027 | (let* ((this-run-results (erb--run-tasks target-emacs | 1036 | (let* ((this-run-results (erb--run-tasks target-emacs |
| 1028 | file selected-tasks))) | 1037 | file file-tasks))) |
| 1029 | (setq all-run-results | 1038 | (setq all-run-results |
| 1030 | (erb--merge-run-results all-run-results | 1039 | (erb--merge-run-results all-run-results |
| 1031 | this-run-results)) | 1040 | this-run-results)) |