Changeset 48 for branches/home/psmith
- Timestamp:
- 01/22/07 03:43:03 (18 years ago)
- Location:
- branches/home/psmith/restructure
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/home/psmith/restructure/run-yarpc-client.lisp ¶
r44 r48 7 7 (sleep 4) 8 8 (let ((sm (nio:add-connection "127.0.0.1" 16323 'nio-yarpc:yarpc-client-state-machine))) 9 (format t "~A toplevel adding conn ~A~%" (nio-compat:get-readable-time)sm)9 (format-log t "toplevel adding conn ~A~%" sm) 10 10 (loop 11 (format t "~A toplevel Submitting job~%" (nio-compat:get-readable-time))12 (format t "~A Result of remote-execute ~A~%" (nio-compat:get-readable-time)(nio-yarpc:remote-execute sm "(nio-yarpc:test-rpc-list)"))))11 (format-log t "Toplevel Submitting job~%" ) 12 (format-log t "Result of remote-execute ~A~%" (nio-yarpc:remote-execute sm "(nio-yarpc:test-rpc-list)")))) -
TabularUnified branches/home/psmith/restructure/src/compat/nio-compat-package.lisp ¶
r44 r48 36 36 37 37 ;;utils 38 get-readable-time38 format-log 39 39 )) -
TabularUnified branches/home/psmith/restructure/src/compat/utils.lisp ¶
r47 r48 53 53 (+ universal-base (/ (- current-internal internal-base) internal-time-units-per-second) ))) 54 54 55 (defun get-readable-high-res ()55 (defun get-readable-high-res-time() 56 56 (let ((estimated-universal-float (get-universal-high-res))) 57 57 (multiple-value-bind (estimated-universal estimated-universal-rem) (floor estimated-universal-float) … … 59 59 60 60 ) 61 62 ;Format the message to destination but prepend a high res time to the message, useful for logging 63 (defmacro format-log (destination control-string &rest format-arguments) 64 `(format ,destination (concatenate 'string "~A - " ,control-string) (get-readable-high-res-time) ,@format-arguments)) -
TabularUnified branches/home/psmith/restructure/src/io/async-fd.lisp ¶
r44 r48 150 150 (defun write-more (async-fd) 151 151 "Write data from ASYNC-FD's write bytebuffer" 152 #+nio-debug (formatt "async-fd:write-more - called with ~A~%" async-fd)152 (format-log t "async-fd:write-more - called with ~A~%" async-fd) 153 153 (with-slots (write-fd foreign-write-buffer close-pending) async-fd 154 154 #+nio-debug (format t "async-fd:write-more - foreign-write-buffer b4 flip ~A~%" foreign-write-buffer) -
TabularUnified branches/home/psmith/restructure/src/io/nio-server.lisp ¶
r44 r48 123 123 (t 124 124 (let ((async-fd (gethash fd client-hash))) 125 #+nio-debug (formatt "IO event ~A on ~A~%" event async-fd)125 (format-log t "IO event ~A on ~A~%" event async-fd) 126 126 (unless (null async-fd) 127 127 (catch 'error-exit -
TabularUnified branches/home/psmith/restructure/src/protocol/yarpc/yarpc-state-machine.lisp ¶
r46 r48 60 60 61 61 (defun run-job(&key (wait-on-job-pdw t)) 62 (format t "~A Server toplevel waiting for job~%" (nio-compat:get-readable-time))62 (format-log t "Server toplevel waiting for job~%") 63 63 (destructuring-bind (job result-queue) (nio-compat:take nio-yarpc:job-queue :blocking-call wait-on-job-pdw) 64 (format t "~A Server received job ~A~%" (nio-compat:get-readable-time)job)64 (format-log t "Server received job ~A~%" job) 65 65 (nio-compat:add result-queue (nio-yarpc:execute-call job)))) 66 66 67 67 68 68 (defmethod process-outgoing-packet((sm yarpc-state-machine)) 69 (format t "yarpc-state-machine: process-outgoing-packet called, polling the results-queue ~%")69 (format-log t "yarpc-state-machine: process-outgoing-packet called, polling the results-queue ~%" ) 70 70 (let ((result (nio-compat:take (result-queue sm) :blocking-call nil))) 71 71 (format t "yarpc-state-machine: process-outgoing-packet got result ~A ~%" result) … … 76 76 (defmethod process-incoming-packet ((sm yarpc-state-machine) (call call-method-packet)) 77 77 (assert (eql (state sm) STATE-INITIALISED)) 78 (format t "yarpc-state-machine:process-incoming-packet called :sm ~A :packet ~A~%" sm call)78 (format-log t "yarpc-state-machine:process-incoming-packet called :sm ~A :packet ~A~%" sm call) 79 79 (nio-compat:add job-queue (list (call-string call) (result-queue sm))) 80 80 (when +process-jobs-inline+ (run-job :wait-on-job-pdw nil))) -
TabularUnified branches/home/psmith/restructure/src/statemachine/state-machine.lisp ¶
r44 r48 58 58 (with-slots (foreign-read-buffer) sm 59 59 (let ((incoming-packet (get-packet (get-packet-factory sm) foreign-read-buffer))) 60 (format t "~A state-machine::process-read - incoming packet: ~A~%" (nio-compat:get-readable-time)incoming-packet)60 (format-log t "state-machine::process-read - incoming packet: ~A~%" incoming-packet) 61 61 (when incoming-packet 62 62 (when (not (process-incoming-packet sm incoming-packet)) … … 68 68 (with-slots (foreign-write-buffer) sm 69 69 (let ((outgoing-packet (process-outgoing-packet sm))) 70 (format t "~A state-machine::process-write - outgoing packet: ~A~%" (nio-compat:get-readable-time)outgoing-packet)70 (format-log t "state-machine::process-write - outgoing packet: ~A~%" outgoing-packet) 71 71 (when outgoing-packet (write-bytes outgoing-packet foreign-write-buffer))))) 72 72
Note: See TracChangeset
for help on using the changeset viewer.