Exemplo n.º 1
0
        private static void ProcessLog(LoadTest currentTest)
        {
            Console.WriteLine("Processing Log !");
            var cursorLeft = Console.CursorLeft;
            var cursorTop  = Console.CursorTop;
            var spinner1   = new ConsoleWaiter(cursorLeft, cursorTop, 400);

            spinner1.Start();
            var log = FileProcesser.ProcessFile(currentTest);

            spinner1.Stop();

            Console.WriteLine("CHECKING FILE:");
            Console.WriteLine("Received Messages:  " + log.RecievedMessages);
            Console.WriteLine("Processed Messages: " + log.ProcessedMessages);
            Console.WriteLine("In QUEUE: " + log.TotalReadedLines);
        }
Exemplo n.º 2
0
        private static void GenerateCalls(LoadTest currentLoadTest)
        {
            var animation = new List <string>
            {
                "<(O_o )>",
                "^(O.o )>",
                "(O.o )>;= ",
                "(O.o )>;= -",
                "(O.o )>;=   -",
                "(O.o )>;= -   -",
                "(O.o )>;= -   -   -",
                "(O.o )>;= -   -   -   -",
                "(O.o )>;= -   -   -   -   -",
                "(O.o )>;= -   -   -   -   -   -",
                "(O.o )>;=     -   -   -   -   -   *",
                "(O.o )>;=         -   -   -   -   *",
                "(O.o )>;=             -   -   -   *",
                "(O.o )>;=                     -   *",
                "(O.o )>;=~                         ",
            };

            var cursorLeft = Console.CursorLeft;
            var cursorTop  = Console.CursorTop;


            var factory   = new ProcessFactory(currentLoadTest.Clients, currentLoadTest.MessagesByClient);
            var processes = factory.Processes;

            cursorLeft = Console.CursorLeft;
            cursorTop  = Console.CursorTop;
            var waiter = new ConsoleWaiter(cursorLeft, cursorTop, 400, animation);

            waiter.Start();

            factory.Excecute(currentLoadTest.Id);

            waiter.Stop();

            Console.WriteLine("All threads are complete !!");

            Wait(currentLoadTest.TotalSendedMessages);
        }