for ( int i = 0; i < BANDWIDTH_ITER; ++i )
{
// test upload bandwidth
final byte[] uploadBytes = new byte[ 1 * MB ];
final long uploadStart = now();
sample.uploadBytes( uploadBytes );
final long uploadElapsed = now() - uploadStart;
final int uploadKBPerSec = (int)((uploadBytes.length / 1024.0) / (uploadElapsed / 1000.0));
printPerf( "Upload bandwidth (" + uploadBytes.length + " bytes): " + uploadKBPerSec + "kb/sec" );
// test download bandwidth