[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flx 3cd3bf7687 129/182: add perf test-case
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flx 3cd3bf7687 129/182: add perf test-case |
Date: |
Tue, 13 Dec 2022 03:59:37 -0500 (EST) |
branch: elpa/flx
commit 3cd3bf768700330d40cec019926311875ff364d1
Author: Le Wang <l26wang@gmail.com>
Commit: Le Wang <l26wang@gmail.com>
add perf test-case
---
tests/flx-test.el | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/tests/flx-test.el b/tests/flx-test.el
index f8ea45572c..4eb8d9c5c8 100644
--- a/tests/flx-test.el
+++ b/tests/flx-test.el
@@ -34,6 +34,7 @@
(eval-when-compile (require 'cl))
(require 'ert)
+(require 'async)
(require 'flx)
(ert-deftest flx-test-sanity ()
@@ -199,6 +200,7 @@ In this case, the match with more contiguous characters is
better."
;;; makes, we've gone the opposite way. :)
;;;
;;; We strongly prefer basename matches, where as they do not.
+
(ert-deftest flx-imported-prioritizes-matches-after-/ ()
(let ((query "b"))
(let ((higher (flx-score "foo/bar" query (flx-make-filename-cache)))
@@ -348,6 +350,24 @@ substring can overpower abbreviation."
(should (not upper-no-folds))))
+;;; perf
+
+(ert-deftest flx-prune-paths-optimizations ()
+ "Make sure optimizations that prune bad paths early are working."
+ (let ((future (async-start
+ `(lambda ()
+ ,(async-inject-variables "\\`load-path\\'")
+ (require 'flx)
+ (flx-score
"~/foo/bar/blah.elllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll"
"lllllll" (flx-make-filename-cache)))
+ nil))
+ result)
+ (with-timeout (1 (kill-process future) )
+ (while (not result) ;; while process is running
+ (sit-for .2)
+ (when (async-ready future)
+ (setq result (async-get future)))))
+ (should result)))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; flx-test.el ends here
- [nongnu] elpa/flx 64b8e0f934 027/182: work around ido bug 10994, (continued)
- [nongnu] elpa/flx 64b8e0f934 027/182: work around ido bug 10994, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 8605b4b421 026/182: don't do caching when reading file names, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 8849b39816 066/182: Make flx-capital-p behave correctly for non-latin words, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx ad87db4348 068/182: Make flx-ido depend on flx on package level, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 225fae97c9 070/182: Mention Marmalade in the README, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 43f78d4815 090/182: Touch-up commentary., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx dd428a8cc6 095/182: Add some debug statements., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3054a8038d 112/182: Fix typo in README.md, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f0c3157268 114/182: Increase default flx-ido-threshold to 6000, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f5fda2897f 125/182: enable lexical-binding, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3cd3bf7687 129/182: add perf test-case,
ELPA Syncer <=
- [nongnu] elpa/flx 2b31df9ed0 140/182: Make dynamic programming test even more "difficult", ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx cd557fcb00 051/182: fix C-SPC, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 9e7749e9e6 067/182: Merge pull request #27 from bbatsov/fix-capital-check, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 7424f54816 079/182: flx-ido: don't require cl; flx requires it anyway, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3bcaf03434 002/182: add readme, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx bdfd9d98aa 014/182: add travis status image, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 6189f05c7e 004/182: add flx, ido implementation and helm experiment, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 4c67675437 032/182: add GC tuning information to README, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 114cf369cb 020/182: add ido installation instructions, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 7452ab1c79 021/182: README update, ELPA Syncer, 2022/12/13