Code: Select all
Debug StrD(mymbs,3) + " MiB/s"
Code: Select all
Debug StrD(mymbs,3) + " MiB/s"
Hiinfratec wrote: ↑Tue Jan 25, 2022 8:17 am Think a bit ...
2097152 bytes are nearly 2MB
If you wrote this in 0.6 seconds, the MB/s must nearly the double value and not 0.00X
Code: Select all
bytes.i = 2097152 ms.i = 653 MBs.d = bytes / ms * 1000 / 1024 / 1024 ;MBs.d = bytes / ms / 1048.576 Debug MBs
Code: Select all
Global.i Bytes
Global.d MB1s,MB2s
Global.f MiBi
Global.f Mega
;base 1048.576 - Numeric ?
Bytes = 2097152
MiBi = 1048.576
MB1s = Bytes / MiBi
Debug StrD(MB1s,8)
;1999.99990501
;base 1024 - Binary ?
Mega = 1024
MB2s = Bytes / Mega
Debug StrD(MB2s,8)
;2048.00000000
Code: Select all
ms * 1000 / 1024 / 1024
Thank you Infratec, you gave me a good answer and I clarified my ideas
Code: Select all
mymbs = mybytes / myms * 1000 / 1024 / 1024
Debug StrD(mymbs,3) + " MB/s"
Code: Select all
text$ + "Test took " + StrD((datestop - datestart) / 60000.0, 3) + " minutes, speed was " + StrD(totalsize / 1048576.0 / (speedsum / 1000.0), 2) + " MB/s (" + StrD(totalsize / 131072.0 / (speedsum / 1000.0), 2) + " mbit/s)." + #LF$
Code: Select all
StrD(totalsize / 1048576.0 / (speedsum / 1000.0), 2) + " MB/s (" + StrD(totalsize / 131072.0 / (speedsum / 1000.0), 2) + " mbit/s)."
Code: Select all
bytes.i = 2097152
ms.i = 653
MBs.d = bytes / ms * 1000 / 1024 / 1024
;MBs.d = bytes / ms / 1048.576
Debug MBs
Code: Select all
bytes.i = 2097152
ms.i = 653
MBs.d = bytes / ms * 1000 / 1024 / 1024 * 11 * 10 / 110
Debug MBs
Thank You
Code: Select all
Global.i totalsize = 2097152
Global.i speedsum = 1405
Global.d Rescator_MBs = (totalsize / 1048576 / (speedsum / 1000))
Debug "Rescator MBs = "+Rescator_MBs
Global.d Infratec_MBs = (totalsize / speedsum * 1000 / 1024 /1024)
Debug "Infratec MBs = "+Infratec_MBs
Debug "and this is ok."
Debug "But in addition we could visualize:"
Global.d Rescator_mbit_s = (totalsize / 131072 / (speedsum / 1000))
Debug "Rescator mbit/s = "+Rescator_mbit_s
Debug "Something is not right here ?"
Code: Select all
bytes=FileSize("anyname.anyprefix")
gbs=bytes/total_ms*1000/1024.0/1024.0/1024.0
If gbs<1.0
gbs=0
mbs=bytes/total_ms*1000/1024.0/1024.0/1024.0
EndIf