use logical number of files and sizes for statistics and quota
This commit is contained in:
@@ -58,12 +58,12 @@ func (c *commandS3BucketList) Do(args []string, commandEnv *CommandEnv, writer i
|
||||
return nil
|
||||
}
|
||||
collection := entry.Name
|
||||
var collectionSize, fileCount uint64
|
||||
var collectionSize, fileCount float64
|
||||
if collectionInfo, found := collectionInfos[collection]; found {
|
||||
collectionSize = collectionInfo.Size
|
||||
fileCount = collectionInfo.FileCount - collectionInfo.DeleteCount
|
||||
}
|
||||
fmt.Fprintf(writer, " %s\tsize:%d\tfile:%d", entry.Name, collectionSize, fileCount)
|
||||
fmt.Fprintf(writer, " %s\tsize:%.0f\tfile:%.0f", entry.Name, collectionSize, fileCount)
|
||||
if entry.Quota > 0 {
|
||||
fmt.Fprintf(writer, "\tquota:%d\tusage:%.2f%%", entry.Quota, float64(collectionSize)*100/float64(entry.Quota))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user