private void Button_Click_1(object sender, RoutedEventArgs e) { int objSize = 512 * 512 * 127; int rounds = 2; BartServiceClient client = new BartServiceClient("NetTcpBinding_IBartService"); //BartService.BartServiceClient client = new BartService.BartServiceClient("BasicHttpBinding_IBartService"); Stopwatch timer = new Stopwatch(); double totalTime = 0; for (int r = 0; r < rounds; ++r) { timer.Restart(); BigObject obj = client.GetBigObject(objSize); timer.Stop(); Debug.WriteLine("Round: " + r); Debug.WriteLine("Name: " + obj.Name); Debug.WriteLine("Data Len: " + obj.Data.Count()); Debug.WriteLine("Elapsed time: " + timer.Elapsed.TotalSeconds); totalTime += timer.Elapsed.TotalSeconds; } Debug.WriteLine("Average time: " + totalTime / rounds); }
private void Button_Click(object sender, RoutedEventArgs e) { BartServiceClient client = new BartServiceClient("NetTcpBinding_IBartService"); var issues = client.GetIssue(Guid.NewGuid().ToString(), new IssueRequest() { UserName = Environment.UserName }); }