@@ -581,6 +581,7 @@ func (ep *Endpoint) setup() (err error) {
581581 g .Debug ("running endpoint setup sequence (%d calls)" , len (ep .Setup ))
582582
583583 baseEndpoint := & Endpoint {
584+ Name : g .F ("%s.setup" , ep .Name ),
584585 context : g .NewContext (ep .context .Ctx ),
585586 conn : ep .conn ,
586587 State : g .M (),
@@ -618,6 +619,7 @@ func (ep *Endpoint) teardown() (err error) {
618619 g .Debug ("running endpoint teardown sequence (%d calls)" , len (ep .Teardown ))
619620
620621 baseEndpoint := & Endpoint {
622+ Name : g .F ("%s.teardown" , ep .Name ),
621623 context : g .NewContext (ep .context .Ctx ),
622624 conn : ep .conn ,
623625 State : g .M (),
@@ -721,20 +723,20 @@ type Iterate struct {
721723}
722724
723725type Iteration struct {
724- state StateMap // each iteration has its own state
725- id int // iteration ID
726- sequence int // paginated request number
727- field string // state field
728- value any // state value
729- stop bool // whether to stop the iteration
730- context * g.Context
731- endpoint * Endpoint
726+ state StateMap // each iteration has its own state
727+ id string // iteration ID
728+ sequence int // paginated request number
729+ field string // state field
730+ value any // state value
731+ stop bool // whether to stop the iteration
732+ context * g.Context
733+ endpoint * Endpoint
734+ requestWg sync.WaitGroup // request wait group
732735}
733736
734737func (iter * Iteration ) Debug (text string , args ... any ) {
735- if iter .field != "" {
736- id := g .F ("i%02d" , iter .id )
737- text = env .DarkGrayString (id ) + " " + text
738+ if iter .id != "" {
739+ text = env .DarkGrayString (iter .id ) + " " + text
738740 }
739741 g .Debug (text , args ... )
740742}
@@ -866,7 +868,7 @@ func NewSingleRequest(iter *Iteration) *SingleRequest {
866868
867869 id := g .F ("r.%04d.%s" , iter .endpoint .totalReqs , g .RandString (g .AlphaRunesLower , 3 ))
868870 if iter .field != "" {
869- id = g .F ("i%02d .r%03d.%s" , iter .id , iter .sequence , g .RandString (g .AlphaRunesLower , 3 ))
871+ id = g .F ("%s .r%03d.%s" , iter .id , iter .sequence , g .RandString (g .AlphaRunesLower , 3 ))
870872 }
871873
872874 return & SingleRequest {
0 commit comments