@@ -1128,14 +1128,14 @@ func newDownloadProgresser(totalSize int64, callback func(progress float64, prog
11281128func (p * sDownloadProgresser ) Progress (_ int64 , written int64 ) {
11291129 p .progress += written
11301130 duration := time .Since (p .startTime )
1131- progress := float64 (p .progress ) / float64 (p .totalSize )
1131+ progress := float64 (p .progress * 100 ) / float64 (p .totalSize )
11321132 progressMbps := calculateRateMbps (p .progress , duration )
11331133 if p .callback != nil {
11341134 p .callback (progress , progressMbps , p .totalSize / 1000 / 1000 )
11351135 }
11361136 if time .Since (p .reportTime ) > time .Second * 5 {
11371137 p .reportTime = time .Now ()
1138- log .Infof ("Download progress: %d/%d, %f%%, %fMbps" , p .progress , p .totalSize , progress * 100 , progressMbps )
1138+ log .Infof ("Download progress: %d/%d, %f%%, %fMbps" , p .progress , p .totalSize , progress , progressMbps )
11391139 }
11401140}
11411141
@@ -1146,6 +1146,9 @@ func (p *sDownloadProgresser) Summary() {
11461146}
11471147
11481148func DownloadObjectParallelWithProgress (ctx context.Context , bucket ICloudBucket , key string , rangeOpt * SGetObjectRange , output io.WriterAt , outputOffset int64 , blocksz int64 , debug bool , parallel int , callback func (progress float64 , progressMbps float64 , totalSizeMb int64 )) (int64 , error ) {
1149+ if debug {
1150+ log .Debugf ("DownloadObjectParallelWithProgress bucket: %s key: %s offset: %d blocksz: %d parallel: %d" , bucket .GetName (), key , outputOffset , blocksz , parallel )
1151+ }
11491152 obj , err := GetIObject (bucket , key )
11501153 if err != nil {
11511154 return 0 , errors .Wrap (err , "GetIObject" )
0 commit comments