Skip to content

Commit

Permalink
Fix throughput not correctly calculated
Browse files Browse the repository at this point in the history
  • Loading branch information
Rouzax committed Sep 12, 2023
1 parent 48b26ed commit f98e0f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions functions/Start-RoboCopy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ function Start-RoboCopy {
# Now remove the white space between the values.'
$bytes = $bytes -split '\s+'

# The raw text from the log file contains a k,m,or g after the non zero numers.
# This will be used as a multiplier to determin the size in kb.
# The raw text from the log file contains a k,m,or g after the non zero numbers.
# This will be used as a multiplier to determine the size in kb.
$counter = 0
$tempByteArray = 0, 0, 0, 0, 0, 0
$tempByteArrayCounter = 0
Expand Down Expand Up @@ -134,6 +134,8 @@ function Start-RoboCopy {
# Example: Speed : 120.816 Bytes/min.
$speed = $_.Replace('Speed :', '').Trim()
$speed = $speed.Replace('Bytes/sec.', '').Trim()
# Remove any dots in the number
$speed = $speed.Replace('.', '').Trim()
# Assign the appropriate column to values.
$speed = Format-Size -SizeInBytes $speed
}
Expand Down

0 comments on commit f98e0f3

Please sign in to comment.