Start() public method

public Start ( string trackerAddress ) : void
trackerAddress string
return void
コード例 #1
0
ファイル: Main.cs プロジェクト: stojy/monotorrent
        private static void Benchmark()
        {
            Console.Clear();
            Console.Write("How many active torrents will be simulated: ");
            int torrents = GetInt();
            Console.Write("How many active peers per torrent: ");
            int peers = GetInt();
            Console.Write("How many requests per second: ");
            int requests = GetInt();

            Console.Write("What is the tracker address: ");
            string address = Console.ReadLine();

            StressTest test = new StressTest(torrents, peers, requests);
            test.Start(address);

            while (true)
            {
                Console.WriteLine("Measured announces/sec:  {0}", test.RequestRate);
                Console.WriteLine("Total announces: {0}", test.TotalTrackerRequests);
                Console.WriteLine(Environment.NewLine);
                System.Threading.Thread.Sleep(1000);
            }
        }