+(defun print-time (&key real-time-ms user-run-time-us system-run-time-us
+ gc-run-time-ms processor-cycles eval-calls
+ lambda-conversions page-faults bytes-consed
+ aborted)
+ (let ((total-run-time-us (+ user-run-time-us system-run-time-us)))
+ (format *trace-output*
+ "~&Evaluation took:~%~
+ ~@< ~@;~/sb-impl::format-milliseconds/ of real time~%~
+ ~/sb-impl::format-microseconds/ of total run time ~
+ (~@/sb-impl::format-microseconds/ user, ~@/sb-impl::format-microseconds/ system)~%~
+ ~[[ Run times consist of ~/sb-impl::format-milliseconds/ GC time, ~
+ and ~/sb-impl::format-milliseconds/ non-GC time. ]~%~;~2*~]~
+ ~,2F% CPU~%~
+ ~@[~:D form~:P interpreted~%~]~
+ ~@[~:D lambda~:P converted~%~]~
+ ~@[~:D processor cycles~%~]~
+ ~@[~:D page fault~:P~%~]~
+ ~:D bytes consed~%~
+ ~@[~%before it was aborted by a non-local transfer of control.~%~]~:>~%"
+ real-time-ms
+ total-run-time-us
+ user-run-time-us
+ system-run-time-us
+ (if (zerop gc-run-time-ms) 1 0)
+ gc-run-time-ms
+ ;; Round up so we don't mislead by saying 0.0 seconds of non-GC time...
+ (- (ceiling total-run-time-us 1000) gc-run-time-ms)
+ (if (zerop real-time-ms)
+ 100.0
+ (float (* 100 (/ (round total-run-time-us 1000) real-time-ms))))
+ eval-calls
+ lambda-conversions
+ processor-cycles
+ page-faults
+ bytes-consed
+ aborted)))
+