Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 112 additions & 2 deletions src/logger.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,39 @@
(getf entry ':address)
(getf entry ':id)))

(defmethod print-log-entry (entry
(source blossom-node)
(entry-type (eql ':pinging-vertices))
&optional (stream *standard-output*))
(format stream "~5f: [~a] pinging vertices ~{~a~^ ~}~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':vertices)))

(defmethod print-log-entry (entry
(source blossom-node)
(entry-type (eql ':processing-reply-pong))
&optional (stream *standard-output*))
(format stream "~5f: [~a] processing reply pong ~a ~a ~{~a~^ ~} from ~a~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':reply-pong-rec)
(getf entry ':reply-pong-weight)
(getf entry ':reply-pong-edges)
(getf entry ':reply-pong-target)))

(defmethod print-log-entry (entry
(source blossom-node)
(entry-type (eql ':unified-reply-pong))
&optional (stream *standard-output*))
(format stream "~5f: [~a] unified pong is ~a ~a ~{~a~^ ~} from ~a~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':unified-pong-rec)
(getf entry ':unified-pong-weight)
(getf entry ':unified-pong-edges)
(getf entry ':unified-pong-target)))

(defmethod print-log-entry (entry
(source supervisor)
(entry-type (eql ':got-recommendation))
Expand All @@ -39,6 +72,50 @@
(getf entry ':edges)
(getf entry ':source-root))))

(defmethod print-log-entry (entry
(source supervisor)
(entry-type (eql ':checking-reweight))
&optional (stream *standard-output*))
(format stream "~5f: [~a] checking if roots (~{~a~^ ~}) are clear to reweight by ~a~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':roots)
(getf entry ':weight)))

(defmethod print-log-entry (entry
(source supervisor)
(entry-type (eql ':check-reweight-details))
&optional (stream *standard-output*))
(format stream "~5f: [~a] checked if roots (~{~a~^ ~}) are clear to reweight by ~a and got pong ~a ~a ~{~a~^ ~} from ~a~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':roots)
(getf entry ':weight)
(getf entry ':check-pong-rec)
(getf entry ':check-pong-weight)
(getf entry ':check-pong-edges)
(getf entry ':check-pong-target)))

(defmethod print-log-entry (entry
(source supervisor)
(entry-type (eql ':check-reweight-aborting-lower-weight))
&optional (stream *standard-output*))
(format stream "~5f: [~a] aborting reweight because we got a lower-weight rec (~a < ~a)~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':check-pong-weight)
(getf entry ':original-weight)))

(defmethod print-log-entry (entry
(source supervisor)
(entry-type (eql ':check-reweight-aborting-lower-precedence))
&optional (stream *standard-output*))
(format stream "~5f: [~a] aborting reweight because we got a lower-precedence rec (~a < ~a)~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':check-pong-rec)
(getf entry ':original-rec)))

(defmethod print-log-entry (entry
(source supervisor)
(entry-type (eql ':reweighting))
Expand All @@ -49,15 +126,48 @@
(getf entry ':roots)
(getf entry ':weight)))

(defmethod print-log-entry (entry
(source supervisor)
(entry-type (eql ':reweighting-finished))
&optional (stream *standard-output*))
(format stream "~5f: [~a] finished reweighting roots (~{~a~^ ~}) by ~a~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':roots)
(getf entry ':weight)))

(defmethod print-log-entry (entry
(source supervisor)
(entry-type (eql ':checking-rewinding))
&optional (stream *standard-output*))
(format stream "~5f: [~a] checking if roots (~{~a~^ ~}) need to rewind~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':roots)))

(defmethod print-log-entry (entry
(source supervisor)
(entry-type (eql ':check-rewinding-details))
&optional (stream *standard-output*))
(format stream "~5f: [~a] checked if roots (~{~a~^ ~}) need to rewind and got pong ~a ~a ~{~a~^ ~} from ~a~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':roots)
(getf entry ':rewinding-pong-rec)
(getf entry ':minimum-weight-edge)
(getf entry ':rewinding-pong-edges)
(getf entry ':rewinding-pong-target)))

(defmethod print-log-entry (entry
(source supervisor)
(entry-type (eql ':rewinding))
&optional (stream *standard-output*))
(format stream "~5f: [~a] rewinding roots (~{~a~^ ~}) by ~a~%"
(format stream "~5f: [~a] rewinding roots (~{~a~^ ~}) by ~a (overall: ~a)~%"
(getf entry ':time)
(getf entry ':source)
(getf entry ':roots)
(getf entry ':amount)))
(getf entry ':amount)
(getf entry ':overall)))

(defmethod print-log-entry (entry
(source supervisor)
Expand Down
16 changes: 8 additions & 8 deletions src/operations/multireweight.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ After collecting the `hold-cluster', we then `CHECK-PRIORITY' to determine if we
;; if our best recommendation is zero, we also abort the MRW
((zerop (message-pong-weight internal-pong))
(log-entry :entry-type ':aborting-multireweight-zero-pong
:log-level 1
:source-root source-root
:source-id source-id
:target-root target-root
:weight weight
:edges edges
:recommendation recommendation
:hold-cluster roots)
:log-level 1
:source-root source-root
:source-id source-id
:target-root target-root
:weight weight
:edges edges
:recommendation recommendation
:hold-cluster roots)
(setf (process-lockable-aborting? supervisor) t)))))))))

(define-process-upkeep ((supervisor supervisor)) (GATHER-TARGETS-MULTIREWEIGHT)
Expand Down
Loading