MCPcopy
hub / github.com/github/gh-ost / ElapsedRowCopyTime

Method ElapsedRowCopyTime

go/base/context.go:567–580  ·  view source on GitHub ↗

ElapsedRowCopyTime returns time since starting to copy chunks of rows

()

Source from the content-addressed store, hash-verified

565
566// ElapsedRowCopyTime returns time since starting to copy chunks of rows
567func (mctx *MigrationContext) ElapsedRowCopyTime() time.Duration {
568 mctx.throttleMutex.Lock()
569 defer mctx.throttleMutex.Unlock()
570
571 if mctx.RowCopyStartTime.IsZero() {
572 // Row copy hasn't started yet
573 return 0
574 }
575
576 if mctx.RowCopyEndTime.IsZero() {
577 return time.Since(mctx.RowCopyStartTime)
578 }
579 return mctx.RowCopyEndTime.Sub(mctx.RowCopyStartTime)
580}
581
582// ElapsedRowCopyTime returns time since starting to copy chunks of rows
583func (mctx *MigrationContext) MarkRowCopyEndTime() {

Callers 3

getMigrationETAMethod · 0.80
printStatusMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected