Your best friend for file transfer.Fetch
how does fetch calculate thoughput? (2 posts)
- Started 15 years ago by eris
- Latest reply 15 years ago from Jim Matthews
I'm writing an applescript to do an acceptance test on a network driver. I really need to be able to calculate throughput in bits/second or bytes/second. Assuming the "elapsed transfer time" property is in ticks (?) I've tried just about every combination of the math and still can't get a number close to the "bytes/s" listed in the transfer window.
Is that number correct? If so, how, exactly, do I calculate it from the "elapsed transfer time" and "bytes transfered" properties?
Jim Matthews Administrator
Ticks are 60ths of a second, so the following should duplicate the displayed bytes/second number:
tell application "Fetch 4.0"
set t to elapsed transfer time of transfer window 1
set b to bytes transfered of transfer window 1
set bytes_per_second to (b / (t / 60))
- Page 1
This topic has been closed.