Browse code
Add package docstrings to testing code, fix benchmarking
Fernando Borretti authored on 22/04/2015 22:40:06
Showing 7 changed files
Showing 7 changed files
... | ... |
@@ -1,7 +1,8 @@ |
1 | 1 |
(in-package :cl-user) |
2 | 2 |
(defpackage cl-yaml-test.bench |
3 | 3 |
(:use :cl :fiveam) |
4 |
- (:export :bench)) |
|
4 |
+ (:export :bench) |
|
5 |
+ (:documentation "Benchmarks.")) |
|
5 | 6 |
(in-package :cl-yaml-test.bench) |
6 | 7 |
|
7 | 8 |
;;; Utilities |
... | ... |
@@ -9,8 +10,9 @@ |
9 | 10 |
(defmacro bench (string) |
10 | 11 |
`(finishes |
11 | 12 |
(format t "~%Benchmarking: ~S" ,string) |
12 |
- (benchmark:with-timing 1000 |
|
13 |
- (yaml:parse ,string)))) |
|
13 |
+ (time |
|
14 |
+ (benchmark:with-timing (1000) |
|
15 |
+ (yaml:parse ,string))))) |
|
14 | 16 |
|
15 | 17 |
|
16 | 18 |
;;; Tests |