Overview
Comment: | Cleaned up batchsim |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 |
Files: | files | file ages | folders |
SHA1: |
47f6163e4c28329b133557ead99efbd3 |
User & Date: | mrwellan on 2015-03-27 11:22:21 |
Other Links: | branch diff | manifest | tags |
Context
2015-03-30
| ||
22:49 | Improved recovery when communications goes bad in http transport check-in: 2c6622a2b7 user: matt tags: v1.60 | |
2015-03-27
| ||
11:22 | Cleaned up batchsim check-in: 47f6163e4c user: mrwellan tags: v1.60 | |
10:16 | Added batchsim check-in: 73734120c5 user: mrwellan tags: v1.60 | |
Changes
Modified batchsim/batchsim.scm from [4fb71c3537] to [8edb779609].
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + | (set! *last-draw* (current-milliseconds)))) (include "events.scm") ;; System spec (to be moved into loaded file) ;; ;; x y w gap x-min x-max |
︙ | |||
336 337 338 339 340 341 342 | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | - + - - | (let* ((user (vector-ref hed 0)) (h (let ((numjobs (vector-ref hed 1))) (if *use-log* (inexact->exact (round (log (+ 1 (* *job-log-scale* numjobs))))) numjobs))) (x1 (- x2 bar-width)) (y2 (- origin-y h))) |
Modified batchsim/default.scm from [a22e50f138] to [9a8a9b1e46].
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | ;; run sim for four hours ;; |
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + - + - + + + + + + + + + + + + + + + + + + + - + | (lambda () (let loop ((count 300)) ;; add 100 jobs (add-job "normal" "m" 600 1 1) (if (> count 0)(loop (- count 1)))))) ;; every minute user j runs ten jobs ;; |
︙ |
Modified batchsim/events.scm from [37c26a4330] to [65f06322e9].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | + + + + + | ;;====================================================================== ;; Event Processing and Simulator ;;====================================================================== ;; The global event list (define *event-list* '()) (define *start-time* 0) (define *end-time* (* 60 60 4)) ;; four hours (define *now* *start-time*) (define *done* #f) (define (random-sort l) (sort l (lambda (x y) (equal? 0 (random 2))))) ;; Each item in the event list is a list of a scheduled time and the thunk ;; (time thunk). Sort the list so that the next event is the earliest. ;; (define event-sort (lambda (@a @b) (< (car @a)(car @b)))) |
︙ |