X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Fbenchmarks.lisp;h=66800eb530df19c37fb88fb5eb3a1fa4c6f82920;hb=36509b8d390e94b2b0f8e681c09d5e89452978d8;hp=3802d5c0880d0dbb4d6c154e896813c54b688b4d;hpb=63e4d6376762153f80b13050323ddec364e26eb7;p=clsql.git diff --git a/tests/benchmarks.lisp b/tests/benchmarks.lisp index 3802d5c..66800eb 100644 --- a/tests/benchmarks.lisp +++ b/tests/benchmarks.lisp @@ -3,7 +3,7 @@ ;;;; File: benchmarks.lisp ;;;; Authors: Kevin Rosenberg ;;;; Created: 03/05/2004 -;;;; Updated: $Id: test-init.lisp 9212 2004-05-03 18:44:03Z kevin $ +;;;; Updated: $Id$ ;;;; ;;;; Benchmark suite ;;;; @@ -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-sys::class-slots (find-class 'employee-address)) + :key #'clsql-sys::slot-definition-name)) + (dbi (when slotdef (clsql-sys::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))))