Megatest

Check-in [4309310007]
Login
Overview
Comment:Added mockup for cached writes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 430931000758a816678d86ff55d2c67f05fcb94d
User & Date: mrwellan on 2013-01-30 22:04:00
Other Links: manifest | tags
Context
2013-01-30
23:32
Changed backoff rate and recover rate when no jobs can run but there are still jobs to run check-in: edda18813d user: mrwellan tags: trunk, v1.5212
22:04
Added mockup for cached writes check-in: 4309310007 user: mrwellan tags: trunk
22:01
Added adaptive delay to prevent hammering the db when tests are running but none are ready for launch check-in: fdbfca4367 user: matt tags: trunk
Changes

Added mockup-cached-writes.scm version [693b1bc0fd].























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


(define (make-cached-writer the-db)
  (let ((db    the-db)
	(queue '()))
    (lambda (cacheable . qry-params)
      (if cacheable
	  (set! queue (cons qry-params queue))
	  (begin
	    (print "Starting transaction")
	    (for-each
	     (lambda (queue-item)
	       (print "WRITE to " db ": " queue-item))
	     (reverse queue))
	    (print "End transaction")
	    (print "READ from " db ": " qry-params))))))

(define a (make-cached-writer "the db"))
(a #t "insert abc")
(a #t "insert def")
(a #t "insert hij")
(a #f "select foo")