AbParse.Program.WriteHtmlOutput C# (CSharp) Method

WriteHtmlOutput() private static method

private static WriteHtmlOutput ( List testInfoList, StringBuilder sb ) : void
testInfoList List
sb StringBuilder
return void
        private static void WriteHtmlOutput(List<TestInfo> testInfoList, StringBuilder sb)
        {
            string html = @"<!DOCTYPE HTML>
            <html>
            <head>
            <style>
            body { font-family: verdana; }
            td,th { padding: 5px 12px;  }
            th { background: #535353; color: white; font-weight: normal }
            </style>
            </head>
            <body>
            <h1>Apache Bench Test Results</h1>
            <hr />
            ";

            sb.AppendLine(html);
            sb.AppendLine("<table>");
            sb.AppendLine("<tr><th>Name</th><th>Requests/sec</th><th>Errors<br><small>length errors ok</small></th></tr>");
            foreach (var testInfo in testInfoList.OrderByDescending(ti => ti.RequestsPerSecond))
            {
                sb.AppendLine("\t<tr>");

                sb.AppendLine("\t\t<td>" + testInfo.RequestName + "</td>");
                sb.AppendLine("\t\t<td>" + testInfo.RequestsPerSecond.ToString("n2") + "</td>");
                sb.AppendLine("\t\t<td>" + testInfo.FailedRequests.Trim() + "</td>");
                sb.AppendLine("\t</tr>");
            }

            sb.AppendLine("</table>");
            sb.AppendLine("</body>\r\n</html>");
        }