private static DataTable GetPerfRunResultsTable(Collection <PerfCounterData> perfCounterDataCollection) { DataTable perfRunResultsDataTable = CreateReport.CreatePerfRunTable(); return(CreateReport.AddPerfRunDataToTable(perfRunResultsDataTable, perfCounterDataCollection)); }
private static void Main(string[] args) { //Parse client call xml for 03 - https - 10 threads - 1 hour string clientCallXml = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\https___DVTCM03_8000-TrialPerfRunBatch.Results.xml"; int testDurationInSec = 3600; string targetFolder = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\"; ClientReport clientReport = new ClientReport(); clientReport.GenerateClientReport(clientCallXml, testDurationInSec, targetFolder, "03 - https - 10 threads - 1 hour - "); //Parse client call xml for 03 - https - 1 thread - 1 hour clientCallXml = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\https___DVTCM03_8000-TrialPerfRunBatch.Results.xml"; testDurationInSec = 3600; targetFolder = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\"; clientReport = new ClientReport(); clientReport.GenerateClientReport(clientCallXml, testDurationInSec, targetFolder, "03 - https - 1 thread - 1 hour - "); //string fileName2 = "ImagingTestInProduction - " + "test" + ".txt"; //string logFilePath2 = @"C:\Temp\" + fileName2; //CreateLogFile(logFilePath2); //StreamWriter sw2 = new StreamWriter(logFilePath2); CreateReport createReport = new CreateReport(); //ch.ExceptionTest(); //Parse perflog file to generate latency data for 03 - https - 10 threads - 1 hour string dataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\LatencyPerfCounters.xml"; string perfLogFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\Perflogs\Server\DVTCM03_20121120-000002\Performance Counter - Copy.csv"; string latencyResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\03 - https - 10 threads - 1 hour - LatencyData.html"; string tableTitle = "WCF Service APIs - Server End - Latency (Sec)"; createReport.GetPerfNumbersTableHtml(dataFile, perfLogFilePath, tableTitle, latencyResultFilePath); //Parse perflog file to generate throughput data for 03 - https - 10 threads - 1 hour dataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\ThroughputPerfCounters.xml"; tableTitle = "WCF Service APIs - Server End - Throughput (Calls / sec)"; string throughputResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\03 - https - 10 threads - 1 hour - ThroughputCounters.html"; createReport.GetPerfNumbersTableHtml(dataFile, perfLogFilePath, tableTitle, throughputResultFilePath); //Parse perflog file to generate Calls data for 03 - https - 10 threads - 1 hour string callsDataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\TotalCallsPerfCounters.xml"; string failedCallsDataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\FailedCallsPerfCounters.xml"; tableTitle = "WCF Service APIs - Server End - Calls"; string callsResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\03 - https - 10 threads - 1 hour - CallsData.html"; createReport.GetCallsAndFailedCallsTableHtml(callsDataFile, failedCallsDataFile, perfLogFilePath, tableTitle, callsResultFilePath); //Parse perflog file to generate latency data for 03 - https - 1 thread - 1 hour dataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\LatencyPerfCounters.xml"; perfLogFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\PerfLogs\Server\DVTCM03_20121120-000003\Performance Counter.csv"; latencyResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\03 - https - 1 thread - 1 hour - LatencyData.html"; tableTitle = "WCF Service APIs - Server End - Latency (Sec)"; createReport.GetPerfNumbersTableHtml(dataFile, perfLogFilePath, tableTitle, latencyResultFilePath); //Parse perflog file to generate throughput data for 03 - https - 1 thread - 1 hour dataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\ThroughputPerfCounters.xml"; tableTitle = "WCF Service APIs - Server End - Throughput (Calls / sec)"; throughputResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\03 - https - 1 thread - 1 hour - ThroughputCounters.html"; createReport.GetPerfNumbersTableHtml(dataFile, perfLogFilePath, tableTitle, throughputResultFilePath); //Parse perflog file to generate Calls data for 03 - https - 1 thread - 1 hour callsDataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\TotalCallsPerfCounters.xml"; failedCallsDataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\FailedCallsPerfCounters.xml"; tableTitle = "WCF Service APIs - Server End - Calls"; callsResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\03 - https - 1 thread - 1 hour - CallsData.html"; createReport.GetCallsAndFailedCallsTableHtml(callsDataFile, failedCallsDataFile, perfLogFilePath, tableTitle, callsResultFilePath); }
internal static void GetResultsTableHtml(string resultFilePath, string tableTitle, DataTable resultTable) { //Collection<PerfCounterData> perfCounterDataCollection = // this.GetPerfCounterDataCollection(dataFile); //perfCounterDataCollection = this.PopulatePerfDataFromPerfLogfile( // perfCounterDataCollection, // perfLogFilePath); string htmlString = String.Empty; StringBuilder htmlBuilder = new StringBuilder(); ////Create Top Portion of HTML Document htmlBuilder.Append("<html>"); htmlBuilder.Append("<head>"); htmlBuilder.Append("<style type=\"text/css\">"); htmlBuilder.Append("a:hover"); htmlBuilder.Append("{"); htmlBuilder.Append("background-color:blue"); htmlBuilder.Append("}"); htmlBuilder.Append("</style>"); htmlBuilder.Append("<title>"); htmlBuilder.Append("Page-"); htmlBuilder.Append(Guid.NewGuid().ToString()); htmlBuilder.Append("</title>"); htmlBuilder.Append("</head>"); htmlBuilder.Append("<body>"); ////add table heading htmlBuilder.Append("<h3>"); //htmlBuilder.Append("Server end Perf Counter Values"); htmlBuilder.Append(tableTitle); htmlBuilder.Append("</h3>"); htmlBuilder.Append("<table font-size: small>"); ////Create Header Row htmlBuilder.Append("<thead>"); htmlBuilder.Append("<tr align='left' valign='top' bgcolor=#488AC7>"); //DataTable resultTable = this.GetPerfRunResultsTable(perfCounterDataCollection); foreach (DataColumn column in resultTable.Columns) { htmlBuilder.Append("<th>"); htmlBuilder.Append(column.ColumnName); htmlBuilder.Append("</th>"); } //<th scope="col" id="...">...</th> htmlBuilder.Append("</tr>"); htmlBuilder.Append("</thead>"); htmlBuilder.Append("<tfoot>"); htmlBuilder.Append("<tr>"); htmlBuilder.Append("<td>"); htmlBuilder.Append("</td>"); htmlBuilder.Append("</tr>"); htmlBuilder.Append("</tfoot>"); htmlBuilder.Append("<tbody>"); //htmlBuilder.Append("</tr>"); //htmlBuilder.Append("<tr border: solid 1px White>"); //htmlBuilder.Append("</tr>"); htmlBuilder = CreateReport.GetTableRowsHtml(resultTable, htmlBuilder); htmlBuilder = CreateReport.GetBottomPortionOfHtml(htmlBuilder); ////Create String to be Returned htmlString = htmlBuilder.ToString(); CreateReport.SaveResultHtmlToDisk(resultFilePath, htmlString); }
private static void Main(string[] args) { //Parse client call xml for 03 - https - 10 threads - 1 hour string clientCallXml = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\https___DVTCM03_8000-TrialPerfRunBatch.Results.xml"; int testDurationInSec = 3600; string targetFolder = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\"; ClientReport clientReport = new ClientReport(); clientReport.GenerateClientReport(clientCallXml, testDurationInSec, targetFolder, "03 - https - 10 threads - 1 hour - "); //Parse client call xml for 03 - https - 1 thread - 1 hour clientCallXml = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\https___DVTCM03_8000-TrialPerfRunBatch.Results.xml"; testDurationInSec = 3600; targetFolder = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\"; clientReport = new ClientReport(); clientReport.GenerateClientReport(clientCallXml, testDurationInSec, targetFolder, "03 - https - 1 thread - 1 hour - "); //string fileName2 = "ImagingTestInProduction - " + "test" + ".txt"; //string logFilePath2 = @"C:\Temp\" + fileName2; //CreateLogFile(logFilePath2); //StreamWriter sw2 = new StreamWriter(logFilePath2); CreateReport createReport = new CreateReport(); //ch.ExceptionTest(); //Parse perflog file to generate latency data for 03 - https - 10 threads - 1 hour string dataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\LatencyPerfCounters.xml"; string perfLogFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\Perflogs\Server\DVTCM03_20121120-000002\Performance Counter - Copy.csv"; string latencyResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\03 - https - 10 threads - 1 hour - LatencyData.html"; string tableTitle = "WCF Service APIs - Server End - Latency (Sec)"; createReport.GetPerfNumbersTableHtml(dataFile, perfLogFilePath, tableTitle, latencyResultFilePath); //Parse perflog file to generate throughput data for 03 - https - 10 threads - 1 hour dataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\ThroughputPerfCounters.xml"; tableTitle = "WCF Service APIs - Server End - Throughput (Calls / sec)"; string throughputResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\03 - https - 10 threads - 1 hour - ThroughputCounters.html"; createReport.GetPerfNumbersTableHtml(dataFile, perfLogFilePath, tableTitle, throughputResultFilePath); //Parse perflog file to generate Calls data for 03 - https - 10 threads - 1 hour string callsDataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\TotalCallsPerfCounters.xml"; string failedCallsDataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\FailedCallsPerfCounters.xml"; tableTitle = "WCF Service APIs - Server End - Calls"; string callsResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 10 threads - 1 hour\03 - https - 10 threads - 1 hour - CallsData.html"; createReport.GetCallsAndFailedCallsTableHtml(callsDataFile, failedCallsDataFile, perfLogFilePath, tableTitle, callsResultFilePath); //Parse perflog file to generate latency data for 03 - https - 1 thread - 1 hour dataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\LatencyPerfCounters.xml"; perfLogFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\PerfLogs\Server\DVTCM03_20121120-000003\Performance Counter.csv"; latencyResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\03 - https - 1 thread - 1 hour - LatencyData.html"; tableTitle = "WCF Service APIs - Server End - Latency (Sec)"; createReport.GetPerfNumbersTableHtml(dataFile, perfLogFilePath, tableTitle, latencyResultFilePath); //Parse perflog file to generate throughput data for 03 - https - 1 thread - 1 hour dataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\ThroughputPerfCounters.xml"; tableTitle = "WCF Service APIs - Server End - Throughput (Calls / sec)"; throughputResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\03 - https - 1 thread - 1 hour - ThroughputCounters.html"; createReport.GetPerfNumbersTableHtml(dataFile, perfLogFilePath, tableTitle, throughputResultFilePath); //Parse perflog file to generate Calls data for 03 - https - 1 thread - 1 hour callsDataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\TotalCallsPerfCounters.xml"; failedCallsDataFile = @"C:\Users\sbijay\Documents\Visual Studio 2012\Projects\WCS\Mt Rainier\Manageability\Developement\ReportGenerator\FailedCallsPerfCounters.xml"; tableTitle = "WCF Service APIs - Server End - Calls"; callsResultFilePath = @"C:\Users\sbijay\Desktop\WCS Perf\Perf run results\03 - https - 1 thread - 1 hour\03 - https - 1 thread - 1 hour - CallsData.html"; createReport.GetCallsAndFailedCallsTableHtml(callsDataFile, failedCallsDataFile, perfLogFilePath, tableTitle, callsResultFilePath); }