@@ -636,26 +636,107 @@ func (ec *eventConsumer) consumeReshareEvent() error {
636636 }
637637 ctx := context .Background ()
638638 var wg sync.WaitGroup
639+
640+ nodeID := ec .node .ID ()
641+ startTime := time .Now ()
642+
639643 if oldSession != nil {
644+ initStart := time .Now ()
645+ logger .Info ("Starting old session init" ,
646+ "walletID" , walletID ,
647+ "nodeID" , nodeID ,
648+ "exactTime" , initStart .Format ("15:04:05.000" ))
649+
640650 err := oldSession .Init ()
641651 if err != nil {
642652 ec .handleReshareSessionError (walletID , keyType , msg .NewThreshold , err , "Failed to init old reshare session" , natMsg )
643653 return
644654 }
655+
656+ initElapsed := time .Since (initStart )
657+ logger .Info ("Old session init completed" ,
658+ "walletID" , walletID ,
659+ "nodeID" , nodeID ,
660+ "elapsedMs" , initElapsed .Milliseconds (),
661+ "exactTime" , time .Now ().Format ("15:04:05.000" ))
662+
663+ listenStart := time .Now ()
664+ logger .Info ("Starting old session listen" ,
665+ "walletID" , walletID ,
666+ "nodeID" , nodeID ,
667+ "exactTime" , listenStart .Format ("15:04:05.000" ))
668+
645669 oldSession .ListenToIncomingMessageAsync ()
670+
671+ listenElapsed := time .Since (listenStart )
672+ logger .Info ("Old session listen completed" ,
673+ "walletID" , walletID ,
674+ "nodeID" , nodeID ,
675+ "elapsedMs" , listenElapsed .Milliseconds (),
676+ "exactTime" , time .Now ().Format ("15:04:05.000" ))
646677 }
678+
647679 if newSession != nil {
680+ initStart := time .Now ()
681+ logger .Info ("Starting new session init" ,
682+ "walletID" , walletID ,
683+ "nodeID" , nodeID ,
684+ "exactTime" , initStart .Format ("15:04:05.000" ))
685+
648686 err := newSession .Init ()
649687 if err != nil {
650688 ec .handleReshareSessionError (walletID , keyType , msg .NewThreshold , err , "Failed to init new reshare session" , natMsg )
651689 return
652690 }
691+
692+ initElapsed := time .Since (initStart )
693+ logger .Info ("New session init completed" ,
694+ "walletID" , walletID ,
695+ "nodeID" , nodeID ,
696+ "elapsedMs" , initElapsed .Milliseconds (),
697+ "exactTime" , time .Now ().Format ("15:04:05.000" ))
698+
699+ listenStart := time .Now ()
700+ logger .Info ("Starting new session listen" ,
701+ "walletID" , walletID ,
702+ "nodeID" , nodeID ,
703+ "exactTime" , listenStart .Format ("15:04:05.000" ))
704+
653705 newSession .ListenToIncomingMessageAsync ()
706+
707+ listenElapsed := time .Since (listenStart )
708+ logger .Info ("New session listen completed" ,
709+ "walletID" , walletID ,
710+ "nodeID" , nodeID ,
711+ "elapsedMs" , listenElapsed .Milliseconds (),
712+ "exactTime" , time .Now ().Format ("15:04:05.000" ))
654713 }
655714
715+ warmupStart := time .Now ()
716+ logger .Info ("Starting warmup" ,
717+ "walletID" , walletID ,
718+ "nodeID" , nodeID ,
719+ "exactTime" , warmupStart .Format ("15:04:05.000" ))
720+
656721 ec .warmUpSession ()
722+
723+ warmupElapsed := time .Since (warmupStart )
724+ totalSetupElapsed := time .Since (startTime )
725+ logger .Info ("Warmup completed, starting reshare sessions" ,
726+ "walletID" , walletID ,
727+ "nodeID" , nodeID ,
728+ "warmupMs" , warmupElapsed .Milliseconds (),
729+ "totalSetupMs" , totalSetupElapsed .Milliseconds (),
730+ "exactTime" , time .Now ().Format ("15:04:05.000" ))
731+
657732 if oldSession != nil {
658733 ctxOld , doneOld := context .WithCancel (ctx )
734+ reshareStart := time .Now ()
735+ logger .Info ("Starting old session reshare" ,
736+ "walletID" , walletID ,
737+ "nodeID" , nodeID ,
738+ "exactTime" , reshareStart .Format ("15:04:05.000" ))
739+
659740 go oldSession .Reshare (doneOld )
660741 wg .Add (1 )
661742 go func () {
@@ -676,6 +757,12 @@ func (ec *eventConsumer) consumeReshareEvent() error {
676757
677758 if newSession != nil {
678759 ctxNew , doneNew := context .WithCancel (ctx )
760+ reshareStart := time .Now ()
761+ logger .Info ("Starting new session reshare" ,
762+ "walletID" , walletID ,
763+ "nodeID" , nodeID ,
764+ "exactTime" , reshareStart .Format ("15:04:05.000" ))
765+
679766 go newSession .Reshare (doneNew )
680767 wg .Add (1 )
681768 go func () {
0 commit comments