title: How does lftp calculate the throughput in parallel mode?
body: <p>I'm using <a href="http://lftp.yar.ru/" rel="nofollow noreferrer">lftp</a> (<code>lftp --version</code> shows <code>Version 4.0.9</code>) in mirror mode to test the performance of some sftp servers I'm specially interested in the throughput (bytes/sec) when I run lftp with a different number of concurrent connections.</p>
  <p>When I ran the test with 25 concurrent connections it gave me a rather strange number of 5866 seconds as time to download. To check what was the real time spent in the download I used the time command (as suggested in <a href="https://stackoverflow.com/a/38665501/4385621">this related question</a>).
  The output was:</p>
  <blockquote>
  <p>$ time lftp -e 'mirror --parallel=25 (rest of the command-line)'</p>
  <p>21732837094 bytes transferred in 5866 seconds (3.53M/s)</p>
  <p>real    4m31.315s</p>
  <p>user    1m25.977s</p>
  <p>sys     1m38.041s</p>
  </blockquote>
  <p>My first thought was that those 5866 seconds where the sum of the time spent by every connection, so dividing that by 25 gives me 234,64 seconds (or 03m54.64s) which is kind of far from 4m31.315s.</p>
  <p>Does anyone have an insight on how the numbers from lftp are calculated?</p>