Exemplo n.º 1
0
        public static void Report(SummarizedResult result)
        {
            var table = new Table();

            table.AddColumn("Metric");
            table.AddColumn("");
            table.AddColumn("");
            table.HideHeaders();
            table.Border(TableBorder.Ascii);

            table.AddRow("iterations", St($"{result.Iterations:0}"), St($"{result.IterationsPrSecond:0}/s"));
            table.AddRow("http requests", St($"{result.HttpRequests:0}"), St($"{result.HttpRequestsPrSecond:0}/s"));
            table.AddRow("http errors", St($"{result.HttpErrors:0}"), "");
            table.AddRow("data received", St($"{result.BytesReceived.Bytes().ToString("#.#")}"), St($"{result.BytesReceivedPrSecond.Bytes().ToString("#.#")}/s"));
            table.AddRow("data sent", St($"{result.BytesSent.Bytes().ToString("#.#")}"), St($"{result.BytesSentPrSecond.Bytes().ToString("#.#")}/s ({result.Bandwidth} mbit)"));
            table.AddEmptyRow();
            foreach (var timing in result.Timings.Where(timing => timing.Max != 0))
            {
                table.AddRow($"{timing.Name}:", StTiming("avg", timing.Avg, 10), FormatTiming(timing));
            }
            AnsiConsole.Render(table);
            AnsiConsole.MarkupLine($"[dim deepskyblue2]Done in {result.Elapsed.Humanize(5)}[/]");
        }
Exemplo n.º 2
0
 ValueTask IProgressReporter.Report(SummarizedResult result)
 {
     LoadTestResultToConsole.Report(result);
     return(ValueTask.CompletedTask);
 }
Exemplo n.º 3
0
 public void WriteTestResult(SummarizedResult data)
 {
     LoadTestResultToConsole.Report(data);
 }