예제 #1
0
        static void Main(string[] args)
        {
            var channel = new Channel("localhost:50053", ChannelCredentials.Insecure,
                                      new List <ChannelOption>
            {
                new ChannelOption(ChannelOptions.MaxSendMessageLength, 104857600 * 8),
                new ChannelOption(ChannelOptions.MaxReceiveMessageLength, 104857600 * 8)
            });
            var client    = new LotService.LotServiceClient(channel);
            var lotClient = new LotClient(client);
            var sw        = new Stopwatch();

            sw.Start();
            var defects = lotClient.GetDefectsBulk();

            sw.Stop();
            Console.WriteLine($"Overall GetDefectsBulk call got {defects.Count} in {sw.ElapsedMilliseconds} ms");
            sw.Restart();
            var result = lotClient.GetDefectStream();

            result.Wait();
            Console.WriteLine($"Overall GetDefectStream call got {result.Result.Count} in {sw.ElapsedMilliseconds} ms");
        }
예제 #2
0
 public LotClient(LotService.LotServiceClient client)
 {
     _client = client;
 }