private static void RunTest(string name, int numberOfConcurrency, int fileSize, bool isUniqueOssClient)
        {
            var doneEvents         = new List <ManualResetEvent>();
            var prepareFileThreads = new List <PrepareFileThread>();

            for (int i = 0; i < numberOfConcurrency; i++)
            {
                var resetEvent = new ManualResetEvent(false);
                doneEvents.Add(resetEvent);
                var fileName      = Path.Combine(Config.DownloadFolder, string.Format("{0}_{1}", name, i));
                var threadWrapper = new PrepareFileThread(fileName, fileSize, doneEvents[i]);
                prepareFileThreads.Add(threadWrapper);
                ThreadPool.QueueUserWorkItem(threadWrapper.ThreadPoolCallback, i);
            }
            WaitHandle.WaitAll(doneEvents.ToArray());
            doneEvents.Clear();
            prepareFileThreads.Clear();

            var objectOperateThreads = new List <ObjectOperateThread>();

            for (int i = 0; i < numberOfConcurrency; i++)
            {
                var resetEvent = new ManualResetEvent(false);
                doneEvents.Add(resetEvent);
                var fileName      = Path.Combine(Config.DownloadFolder, string.Format("{0}_{1}", name, i));
                var client        = isUniqueOssClient ? _ossClient : OssClientFactory.CreateOssClient();
                var threadWrapper = new ObjectOperateThread(client, fileName, i, doneEvents[i]);
                objectOperateThreads.Add(threadWrapper);
                ThreadPool.QueueUserWorkItem(threadWrapper.ThreadPoolCallback, i);
            }
            WaitHandle.WaitAll(doneEvents.ToArray());
            doneEvents.Clear();
            objectOperateThreads.Clear();
        }
        private static void RunTest(string name, int numberOfConcurrency, int fileSize, bool isUniqueOssClient)
        {
            var doneEvents = new List<ManualResetEvent>();
            var prepareFileThreads = new List<PrepareFileThread>();

            for (int i = 0; i < numberOfConcurrency; i++)
            {
                var resetEvent = new ManualResetEvent(false);
                doneEvents.Add(resetEvent);
                var fileName = Path.Combine(Config.DownloadFolder, string.Format("{0}_{1}", name, i));
                var threadWrapper = new PrepareFileThread(fileName, fileSize, doneEvents[i]);
                prepareFileThreads.Add(threadWrapper);
                ThreadPool.QueueUserWorkItem(threadWrapper.ThreadPoolCallback, i);
            }
            WaitHandle.WaitAll(doneEvents.ToArray());
            doneEvents.Clear();
            prepareFileThreads.Clear();

            var objectOperateThreads = new List<ObjectOperateThread>();

            for (int i = 0; i < numberOfConcurrency; i++)
            {
                var resetEvent = new ManualResetEvent(false);
                doneEvents.Add(resetEvent);
                var fileName = Path.Combine(Config.DownloadFolder, string.Format("{0}_{1}", name, i));
                var client = isUniqueOssClient ? _ossClient : OssClientFactory.CreateOssClient();
                var threadWrapper = new ObjectOperateThread(client, fileName, i, doneEvents[i]);
                objectOperateThreads.Add(threadWrapper);
                ThreadPool.QueueUserWorkItem(threadWrapper.ThreadPoolCallback, i);
            }
            WaitHandle.WaitAll(doneEvents.ToArray());
            doneEvents.Clear();
            objectOperateThreads.Clear();
        }