예제 #1
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Hello ZeroNet");

            StationProgram.RegisteStation(new RemoteLogRecorder());
            StationProgram.Initialize();
            StationProgram.RunConsole();
        }
예제 #2
0
파일: Program.cs 프로젝트: cuiopen/ZeroNet
        private static void Main(string[] args)
        {
            Console.WriteLine("Hello ZeroNet");

            StationProgram.RegisteStation(new PerformanceCounter());
            StationProgram.RegisteStation(new RuntimeWaring());
            StationProgram.Initialize();
            StationProgram.RunConsole();
        }
예제 #3
0
        public static void DoTest()
        {
            Console.WriteLine("Hello ZeroNet");
            //StationProgram.RegisteApiStation(new SubStation
            //{
            //    StationName = "BusinessMonitor",
            //    ExecFunc = ExecCommand
            //});
            //StationProgram.Run/*Console*/();
            StationProgram.RegisteApiStation(new SubStation
            {
                StationName = "EntityEvent",
                ExecFunc    = ExecCommand
            });
            StationProgram.RunConsole();

            while (true)
            {
                Console.ReadKey();
                //MarkPoint();
                cnt = 0;
                Console.WriteLine("start...");
                DateTime start = DateTime.Now;

                time = 0.0;
                for (int i = 0; i < 256; i++)
                {
                    tasks.Add(Task.Factory.StartNew(ApiTest).Id);
                }
                //foreach (var task in tasks)
                //    task.Wait();
                double total;
                while (tasks.Count > 0)
                {
                    Thread.Sleep(1000);
                    total = (DateTime.Now - start).TotalMilliseconds;
                    Console.WriteLine($"{cnt}/{time}ms/{total}ms => {cnt / time * 1000}/s -- {cnt / total * 1000}/s -- { total / cnt }ms -- { time / cnt }ms");
                }
                total = (DateTime.Now - start).TotalMilliseconds;
                Console.WriteLine($"{cnt}/{time}ms/{total}ms => {cnt / time * 1000}/s -- {cnt / total * 1000}/s -- { total / cnt }ms -- { time / cnt }ms");
            }
        }