Пример #1
0
        public void PreformanceTest()
        {
            CodeTimer.Time("Proxy方式服务批量调用", 1000, () =>
            {
                var proxy = ServiceProxy.CreateProxy<ITransSV>();
                proxy.Supported();
            });

            CodeTimer.Time("Agent方式服务批量调用", 1000, () =>
            {
                var sv = new TransSVAgent();
                sv.Supported(true);
                sv.Close();
            });
            CodeTimer.Time("IIS 承载方式服务批量调用", 1000, () =>
            {
                var client = new TransSVClient();
                client.Supported();
                client.Close();
            }
            );
        }
Пример #2
0
 public void ParallelTest()
 {
     CodeTimer.Time("IIS 承载方式服务批量调用", 1000, () =>
                                                {
                                                    var client = new TransSVClient();
                                                    client.Supported();
                                                    client.Close();
                                                });
 }