private static void Main(string[] args) { Console.WriteLine("Hello ZeroNet"); StationProgram.RegisteStation(new RemoteLogRecorder()); StationProgram.Initialize(); StationProgram.RunConsole(); }
private static void Main(string[] args) { Console.WriteLine("Hello ZeroNet"); StationProgram.RegisteStation(new PerformanceCounter()); StationProgram.RegisteStation(new RuntimeWaring()); StationProgram.Initialize(); StationProgram.RunConsole(); }
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"); } }