Esempio n. 1
0
 public void NamedPipeCallbackLoop()
 {
     var binding = new NetNamedPipeBinding() { MaxConnections = 5 };
     var path = "net.pipe://127.0.0.1/" + this.GetType().Name + "_" + MethodBase.GetCurrentMethod().Name;
     var reportWatch = new NStopwatch.Reportwatch();
     for (int i = 0; i < 1000; i++)
     {
         DoHostWithCallbackInternal(reportWatch, binding, path);
     }
     reportWatch.ReportAll();
 }
Esempio n. 2
0
 public void IpcCallbackLoop()
 {
     var binding = new LocalBinding { MaxConnections = 5 };
     var path = "ipc:///" + this.GetType().Name + "_" + MethodBase.GetCurrentMethod().Name;
     var reportWatch = new NStopwatch.Reportwatch();
     for (int i = 0; i < 1000; i++)
     {
         DoHostWithCallbackInternal(reportWatch, binding, path);
     }
     reportWatch.ReportAll();
 }
Esempio n. 3
0
        private static void DoHostWithCallback(Binding binding, string path)
        {
            var reportWatch = new NStopwatch.Reportwatch();

            DoHostWithCallbackInternal(reportWatch, binding, path);
            reportWatch.Report("ServiceHost ctor");
            reportWatch.Report("AddServiceEndpoint");
            reportWatch.Report("Open");
            reportWatch.Report("ChannelFactory ctor");
            reportWatch.Report("CreateChannel");
            reportWatch.Report("Execute");
            reportWatch.ReportAll();
        }
Esempio n. 4
0
        public void IpcCallbackLoop()
        {
            var binding = new LocalBinding {
                MaxConnections = 5
            };
            var path        = "ipc:///" + this.GetType().Name + "_" + MethodBase.GetCurrentMethod().Name;
            var reportWatch = new NStopwatch.Reportwatch();

            for (int i = 0; i < 1000; i++)
            {
                DoHostWithCallbackInternal(reportWatch, binding, path);
            }
            reportWatch.ReportAll();
        }
Esempio n. 5
0
        public void NamedPipeCallbackLoop()
        {
            var binding = new NetNamedPipeBinding()
            {
                MaxConnections = 5
            };
            var path        = "net.pipe://127.0.0.1/" + this.GetType().Name + "_" + MethodBase.GetCurrentMethod().Name;
            var reportWatch = new NStopwatch.Reportwatch();

            for (int i = 0; i < 1000; i++)
            {
                DoHostWithCallbackInternal(reportWatch, binding, path);
            }
            reportWatch.ReportAll();
        }
Esempio n. 6
0
        private static void DoHostWithCallback(Binding binding, string path)
        {
            var reportWatch = new NStopwatch.Reportwatch();

            DoHostWithCallbackInternal(reportWatch, binding, path);
            reportWatch.Report("ServiceHost ctor");
            reportWatch.Report("AddServiceEndpoint");
            reportWatch.Report("Open");
            reportWatch.Report("ChannelFactory ctor");
            reportWatch.Report("CreateChannel");
            reportWatch.Report("Execute");
            reportWatch.ReportAll();
        }