Hi,
Please use this code to determine your actual download speed:
using (Sftp sftp = new Sftp())
{
// connect and login as you are used to
sftp.Connect(server);
sftp.Login(user, password);
int[] fileSizes = { 1024 * 1024 /*1MB*/, 10 * 1024 * 1024 /*10MB*/, 20 * 1024 * 1024 /*20MB*/, 100 * 1024 * 1024 /*100MB*/};
Random rng = new Random();
foreach (var size in fileSizes)
{
Console.WriteLine("Preparing {0} MB of data to process.", size / (1024 * 1024));
byte[] rngFile = new byte[size];
rng.NextBytes(rngFile);
var upload = new MemoryStream(rngFile);
string remotePath = size.ToString() + ".rng";
Console.WriteLine("Uploading {0} bytes of data.", size);
sftp.PutFile(upload, remotePath);
DateTime start = DateTime.Now;
Console.WriteLine("{0} {1} download starts.", start.ToString("HH:mm:ss.ffff"), remotePath);
sftp.GetFile(remotePath, Stream.Null);
DateTime end = DateTime.Now;
Console.WriteLine("{0} {1} download ends.", end.ToString("HH:mm:ss.ffff"), remotePath);
TimeSpan duration = end - start;
Console.WriteLine("Download took {0} of time.", duration.ToString("g"));
Console.WriteLine("Download speed: {0} MB/s", size / (1024 * 1024) / (duration.TotalMilliseconds / 1000d));
Console.WriteLine("Clean up.");
sftp.DeleteFile(remotePath);
Console.WriteLine("-------------");
}
}
You can then count how much time should your batch of files take to download.
Please let us know what your output is from this sample code.