aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-12-30 15:52:35 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-12-30 15:52:35 +0100
commite75be3a6cba8e3a92fd69a75d71452b04a399eee (patch)
tree8cb8dbe89996342be13f58dd2396d2516caac7d8 /module
parentHTML Add current time marker. (diff)
downloadcalp-e75be3a6cba8e3a92fd69a75d71452b04a399eee.tar.gz
calp-e75be3a6cba8e3a92fd69a75d71452b04a399eee.tar.xz
Add simple benchmark main.
Diffstat (limited to 'module')
-rw-r--r--module/entry-points/benchmark.scm18
-rwxr-xr-xmodule/main.scm14
2 files changed, 26 insertions, 6 deletions
diff --git a/module/entry-points/benchmark.scm b/module/entry-points/benchmark.scm
new file mode 100644
index 00000000..eff4c261
--- /dev/null
+++ b/module/entry-points/benchmark.scm
@@ -0,0 +1,18 @@
+(define-module (entry-points benchmark)
+ :export (main)
+
+ :use-module (ice-9 getopt-long)
+ :use-module (util)
+ :use-module (vcomponent)
+ :use-module (parameters)
+ )
+
+
+(define opt-spec
+ '((file (value #t) (single-char #\f))))
+
+(define (main args)
+ (define opts (getopt-long args opt-spec))
+
+ (load-calendars* calendar-files: (cond [(option-ref opts 'file #f) => list]
+ [else (calendar-files)])))
diff --git a/module/main.scm b/module/main.scm
index 4eddeb14..92df5e20 100755
--- a/module/main.scm
+++ b/module/main.scm
@@ -15,12 +15,13 @@ exec guile -e main -s $0 "$@"
(util)
(util io)
- ((entry-points html) :prefix html-)
- ((entry-points terminal) :prefix terminal-)
- ((entry-points import) :prefix import-)
- ((entry-points text) :prefix text-)
- ((entry-points info) :prefix info-)
- ((entry-points ical) :prefix ical-)
+ ((entry-points html) :prefix html-)
+ ((entry-points terminal) :prefix terminal-)
+ ((entry-points import) :prefix import-)
+ ((entry-points text) :prefix text-)
+ ((entry-points info) :prefix info-)
+ ((entry-points ical) :prefix ical-)
+ ((entry-points benchmark) :prefix benchmark-)
((entry-points server) :prefix server-)
@@ -64,6 +65,7 @@ exec guile -e main -s $0 "$@"
((info) info-main)
((ical) ical-main)
((server) server-main)
+ ((benchmark) benchmark-main)
(else => (lambda (s)
(format (current-error-port)
"Unsupported mode of operation: ~a~%"