(in-package :atef) (defparameter *atef-count* (make-hash-table)) (defclass %atef-application-metering (%atef-application) () ) (defmethod reset-atef-metering ((self %atef-application)) (maphash #'(lambda (x y) (setf (gethash x *atef-count*) 0)) *atef-count*) ) (defmethod register-metering ((self %atef-application) fucntion-name) (setf (gethash fucntion-name *atef-count*) 0) ) (defmethod increase-time ((self %atef-application) function-name time) (setf (gethash function-name *atef-count*) (+ (gethash function-name *atef-count*) time) ) ) (defmethod atef-engine-process-typed-stack-top ((self %atef-application-metering) (engine %atef-engine) (type (eql '%si-rule)) ) (let ((start-time (get-internal-real-time)) (result (call-next-method)) ) (increase-time self 'atef-engine-process-typed-stack-top-rule (- (get-internal-real-time) start-time)) result )) (defmethod atef-engine-apply-rule ((self %atef-application-metering) (engine %atef-engine) (rule %atef-rule)) (let ((start-time (get-internal-real-time)) (result (call-next-method)) ) (increase-time self 'atef-engine-apply-rule (- (get-internal-real-time) start-time)) result )) #| (change-class *atef-app* '%atef-application-metering) |# ;; End Of File