X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=tests%2Fbenchmarks.lisp;h=c6b0be0cb7d5a7ac06b2c122b0a4b337dae0d6e0;hp=3802d5c0880d0dbb4d6c154e896813c54b688b4d;hb=131603d1f5661779b00c5cfa79ecceace1078b1d;hpb=63e4d6376762153f80b13050323ddec364e26eb7 diff --git a/tests/benchmarks.lisp b/tests/benchmarks.lisp index 3802d5c..c6b0be0 100644 --- a/tests/benchmarks.lisp +++ b/tests/benchmarks.lisp @@ -68,12 +68,17 @@ (time (dotimes (i n) (query "SELECT * FROM BENCH" :field-names nil))) - (format *report-stream* "~&~%*** OBJECT QUERY ***~%") + (format *report-stream* "~&~%*** JOINED OBJECT QUERY RETRIEVAL IMMEDIATE ***~%") (time - (dotimes (i n) + (dotimes (i (truncate n 10)) (mapcar #'(lambda (ea) (slot-value ea 'address)) (select 'employee-address :flatp t)))) - )) - - - + (format *report-stream* "~&~%*** JOINED OBJECT QUERY RETRIEVAL DEFERRED ***~%") + (let* ((slotdef (find 'address (clsql::class-slots (find-class 'employee-address)) + :key #'clsql::slot-definition-name)) + (dbi (when slotdef (clsql::view-class-slot-db-info slotdef)))) + (setf (gethash :retrieval dbi) :deferred) + (time + (dotimes (i (truncate n 10)) + (mapcar #'(lambda (ea) (slot-value ea 'address)) (select 'employee-address :flatp t)))) + (setf (gethash :retrieval dbi) :immediate))))