diff --git a/06_Tools/ReportTool/sources/rpg.common/Intermediate.cs b/06_Tools/ReportTool/sources/rpg.common/Intermediate.cs index 267574b..b10ea3a 100644 --- a/06_Tools/ReportTool/sources/rpg.common/Intermediate.cs +++ b/06_Tools/ReportTool/sources/rpg.common/Intermediate.cs @@ -38,6 +38,10 @@ public class Intermediate : Dictionary { public static string NOENTITY = "-"; + // intermediate standard separators + public const char DECIMALSEPARATORINTERMEDIATE = '.'; + public const char DECIMALSEPARATORMEASURES = '.'; + /// key-value pair separator public const char KEYVALUESEPARATOR = '='; /// list value separator character @@ -132,7 +136,7 @@ public int ReadFromFile(string filename) /// /// /// - public int ReadFromDatabaseValue(string project, string testrun, string category, string key, string prefix) + public int ReadFromDatabaseValues(string project, string testrun, string category, string key, string prefix) { DataAccess da = new DataAccess(project); //Log.Write(string.Format("readfromdatabasevalue {0}/{1}/{2}/{3}/{4} :", project, testrun, category, entity, prefix)); @@ -150,9 +154,9 @@ public int ReadFromDatabaseValue(string project, string testrun, string category /// /// /// - public int ReadFromDatabaseValue(string project, string testrun, string category, string entity) + public int ReadFromDatabaseValues(string project, string testrun, string category, string entity) { - return ReadFromDatabaseValue(project, testrun, category, entity, ""); + return ReadFromDatabaseValues(project, testrun, category, entity, ""); } /// @@ -234,7 +238,7 @@ public void AddValue(string key, string value) /// public void Normalize() { - Log.WriteLine("normalize intermediate..."); + //Log.WriteLine("normalize intermediate..."); int cnt; int maxCnt = 0; @@ -256,18 +260,14 @@ public void Normalize() // if new value: fill left if ((NumOfElements(newValue) == 1) && (maxCnt>1)) { - //Log.Write("left fill:[" + pair.Key + "=" + pair.Value + "]"); while (NumOfElements(newValue) < maxCnt) newValue = LISTSEPARATOR + newValue; - //Log.WriteLine("->[" + newValue + "]"); } // if already present: fill right else { - //Log.Write("right fill:[" + pair.Key + "=" + pair.Value + "]"); while (NumOfElements(newValue) < maxCnt) newValue = newValue + LISTSEPARATOR; - //Log.WriteLine("->[" + newValue + "]"); } tmpList.Add(pair.Key, newValue); @@ -432,7 +432,7 @@ private int MergeDatabaseKeyValueResult(List dbResult, string prefix) cnt++; } else - Log.WriteLine(string.Format("WARNING ignore intermediate duplicate [{0}]", prefix+row[0])); + Log.WriteLine(string.Format("WARNING ignoring intermediate duplicate [{0}]", prefix+row[0])); } return cnt; // num of rows matching rows } diff --git a/06_Tools/ReportTool/sources/rpg.common/Thresholds.cs b/06_Tools/ReportTool/sources/rpg.common/Thresholds.cs index 1787dfa..88ff11e 100644 --- a/06_Tools/ReportTool/sources/rpg.common/Thresholds.cs +++ b/06_Tools/ReportTool/sources/rpg.common/Thresholds.cs @@ -174,6 +174,8 @@ public static double StringValueToDouble(string value) { try { + return double.Parse(Utils.ToSystemFloatString(value)); + // normale decimal separator if (value.Contains( decimalSeparator )) { @@ -186,8 +188,8 @@ public static double StringValueToDouble(string value) return double.Parse( value.Replace( thousandSeparator, decimalSeparator) ); } - // of integer getal, of lege string - return double.Parse(value); + //// of integer getal, of lege string + //return double.Parse(value); } catch (Exception) { @@ -198,15 +200,15 @@ public static double StringValueToDouble(string value) return double.NaN; } - /// - /// Convert double to a string value with .000 format - /// - /// - /// - public static string DoubleValueToSTring(double value) - { - string formatString = string.Format("0{0}000", decimalSeparator); - return value.ToString(formatString); - } + ///// + ///// Convert double to a string value with .000 format + ///// + ///// + ///// + //public static string DoubleValueToSTring(double value) + //{ + // string formatString = string.Format("0{0}000", decimalSeparator); + // return value.ToString(formatString); + //} } } diff --git a/06_Tools/ReportTool/sources/rpg.common/TransactionValue.cs b/06_Tools/ReportTool/sources/rpg.common/TransactionValue.cs index c500408..dcec217 100644 --- a/06_Tools/ReportTool/sources/rpg.common/TransactionValue.cs +++ b/06_Tools/ReportTool/sources/rpg.common/TransactionValue.cs @@ -166,7 +166,7 @@ private double LowestStrDouble(double baseValue, string value) { try { - double d = double.Parse(Utils.NormalizeFloatString(value)); + double d = double.Parse(Utils.ToSystemFloatString(value)); return d < baseValue ? d : baseValue; } catch @@ -185,7 +185,7 @@ private double AddStrDouble(double baseValue, string value) { try { - double d = double.Parse(Utils.NormalizeFloatString(value)); + double d = double.Parse(Utils.ToSystemFloatString(value)); return baseValue + d; } catch @@ -198,7 +198,7 @@ private double HighestStrDouble(double baseValue, string value) { try { - double d = double.Parse(Utils.NormalizeFloatString(value)); + double d = double.Parse(Utils.ToSystemFloatString(value)); return baseValue > d ? baseValue : d; } catch diff --git a/06_Tools/ReportTool/sources/rpg.common/Utils.cs b/06_Tools/ReportTool/sources/rpg.common/Utils.cs index 6f5ed20..13e5f1f 100644 --- a/06_Tools/ReportTool/sources/rpg.common/Utils.cs +++ b/06_Tools/ReportTool/sources/rpg.common/Utils.cs @@ -156,17 +156,41 @@ public static DateTime ParseJMeterEpoch(string s) } /// - /// Convert malformed decimal string to workable decimal string (acc to system locale) + /// Convert any decimal string to decimal string according to System Locale /// /// /// - public static string NormalizeFloatString(string value) + public static string ToSystemFloatString(string value) + { + return ToAnyFloatString(value, System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator[0]); + } + + /// + /// Convert any decimal string to intermediate general float string + /// + /// + /// + public static string ToIntermediateFloatString(string value) + { + return ToAnyFloatString(value, Intermediate.DECIMALSEPARATORINTERMEDIATE); + } + + /// + /// convert any decimal string to intermediate measure float string + /// + /// + /// + public static string ToMeasureFloatString(string value) + { + return ToAnyFloatString(value, Intermediate.DECIMALSEPARATORMEASURES); + } + + public static string ToAnyFloatString(string value, char separator) { string outValue; - char systemDecimalSeparator = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator[0]; - // maakt niet uit wat er binnen komt (. of , als decimal separator): vervangen door system decimalseparator - outValue = value.Replace(',', systemDecimalSeparator); - outValue = outValue.Replace('.', systemDecimalSeparator); + // maakt niet uit wat er binnen komt (. of , als decimal separator): vervangen door decimalseparator + outValue = value.Replace(',', separator); + outValue = outValue.Replace('.', separator); return outValue; } @@ -174,14 +198,16 @@ public static string NormalizeFloatString(string value) /// Convert Jmeter time to intermediate seconds /// /// - public static string jmeterTimeToSeconds(string jmValueStr) + public static string jmeterTimeToIntermediateSecondsString(string jmValueStr) { //values: 01003_linkhelp,87,58,20,29,91,385,14,2445,0.00,0.1,17.8,262.78 float f; string strVal; try { - strVal = NormalizeFloatString(jmValueStr); + //strVal = ToIntermediateFloatString(jmValueStr); + strVal = ToSystemFloatString(jmValueStr); + if (float.TryParse(strVal, out f)) f = f / 1000; else @@ -192,7 +218,11 @@ public static string jmeterTimeToSeconds(string jmValueStr) Log.WriteLine(string.Format("WARNING cannot parse value [{0}]", jmValueStr)); return jmValueStr; } - return f.ToString("0.000"); + + //return f.ToString("0.000"); + + // elk formaat naar Intermediate float format + return ToIntermediateFloatString(f.ToString()); } /// @@ -200,9 +230,9 @@ public static string jmeterTimeToSeconds(string jmValueStr) /// /// /// - public static string ToMeasureFormat(string val) + public static string ToMeasureFormatString(string value) { - return val.Replace(",", "."); + return ToMeasureFloatString(value); } /// @@ -210,9 +240,9 @@ public static string ToMeasureFormat(string val) /// /// /// - public static string NormalizeFloat(string value) + public static string NormalizeFloatString(string value) { - return NormalizeFloatString(value); + return ToIntermediateFloatString(value); } /// @@ -282,5 +312,15 @@ public static string NormalizeTransactionName(string suggestedName) return newName; } + /// + /// Discover and return the decimal separator character in value + /// + /// + /// + public static char GetDecimalChar(string value) + { + // return first non-numeric character + return Regex.Match(value, "[^\\d]").Value[0]; + } } } diff --git a/06_Tools/ReportTool/sources/rpg.common/rpg.common.csproj b/06_Tools/ReportTool/sources/rpg.common/rpg.common.csproj index 89e3d2d..927b37b 100644 --- a/06_Tools/ReportTool/sources/rpg.common/rpg.common.csproj +++ b/06_Tools/ReportTool/sources/rpg.common/rpg.common.csproj @@ -2,16 +2,16 @@ netcoreapp2.1 - 4.9.3.0 + 4.10.0.0 ICTU Report Generator - common ISR - ICTU 2019 + ICTU 2020 Library - 4.9.2.0 - 4.9.2.0 + 4.10.0.0 + 4.10.0.0 Shared library for report generator binaries diff --git a/06_Tools/ReportTool/sources/rpg.console/rpg.console.csproj b/06_Tools/ReportTool/sources/rpg.console/rpg.console.csproj index 14216bc..6f3c649 100644 --- a/06_Tools/ReportTool/sources/rpg.console/rpg.console.csproj +++ b/06_Tools/ReportTool/sources/rpg.console/rpg.console.csproj @@ -3,16 +3,16 @@ Exe netcoreapp2.1 - 4.9.3.0 + 4.10.0.0 ISR ICTU Report Generator - console tool - ICTU 2019 + ICTU 2020 - 4.2.0.0 + 4.10.0.0 - 4.2.0.0 + 4.10.0.0 Data manipulation in reportgenerator database via the console diff --git a/06_Tools/ReportTool/sources/rpg.loadintermediate/rpg.loadintermediate.csproj b/06_Tools/ReportTool/sources/rpg.loadintermediate/rpg.loadintermediate.csproj index 98e96de..1145b59 100644 --- a/06_Tools/ReportTool/sources/rpg.loadintermediate/rpg.loadintermediate.csproj +++ b/06_Tools/ReportTool/sources/rpg.loadintermediate/rpg.loadintermediate.csproj @@ -3,12 +3,12 @@ Exe netcoreapp2.1 - 4.3.0.0 - 4.3.0.0 + 4.10.0.0 + 4.10.0.0 ICTU Report Generator - load intermediate - ICTU 2019 - 4.9.3.0 + ICTU 2020 + 4.10.0.0 ISR Load intermediate csv data into the reportgenerator database diff --git a/06_Tools/ReportTool/sources/rpg.merge/JoinController.cs b/06_Tools/ReportTool/sources/rpg.merge/JoinController.cs index c6151bf..fb55d7a 100644 --- a/06_Tools/ReportTool/sources/rpg.merge/JoinController.cs +++ b/06_Tools/ReportTool/sources/rpg.merge/JoinController.cs @@ -75,7 +75,7 @@ internal void JoinIntermediateFromDatabase(string project, string testrun, strin // read testrun intermediate from database Intermediate srcIntermediate = new Intermediate(); - int cnt = srcIntermediate.ReadFromDatabaseValue(project, testrun, category, entity); + int cnt = srcIntermediate.ReadFromDatabaseValues(project, testrun, category, entity); Log.WriteLine(string.Format("num of values read for entity [{0}/{1}]: {2}", category, entity, cnt)); // filter only one indexed value per key diff --git a/06_Tools/ReportTool/sources/rpg.merge/MergeController.cs b/06_Tools/ReportTool/sources/rpg.merge/MergeController.cs index c707501..3436652 100644 --- a/06_Tools/ReportTool/sources/rpg.merge/MergeController.cs +++ b/06_Tools/ReportTool/sources/rpg.merge/MergeController.cs @@ -38,7 +38,7 @@ public MergeController(string project) : base() /// /// /// - public void ReadIntermediateValue(string p_project, string p_testrun, string p_category, string p_entity) + public void ReadIntermediateValues(string p_project, string p_testrun, string p_category, string p_entity) { Log.WriteLine("read intermediate..."); Log.WriteLine(string.Format("project/testrun={0}/{1}",project,testrun)); @@ -50,7 +50,7 @@ public void ReadIntermediateValue(string p_project, string p_testrun, string p_c this.entity = p_entity; // read intermediate from VALUE table (common intermediate source) - int cnt = intermediate.ReadFromDatabaseValue(this.project, this.testrun, this.category, this.entity); + int cnt = intermediate.ReadFromDatabaseValues(this.project, this.testrun, this.category, this.entity); Log.WriteLine(cnt+" lines/variables"); } @@ -238,11 +238,6 @@ private string Merge(string templateLine, string varName, string varValue, bool returnValue = "empty"; templateVariable = match.Groups[1].Value; // volledig pattern "blaat:0:0.00"; blaat:0:0.000:0 (laatste waarde is waarde als geen waarde gevonden, bijv: ""; "null"; "0" (string) - //templateVariableName = templateVariable.Contains(':') ? templateVariable.Split(':')[0] : templateVariable; // alleen variable name - //templateValueIndex = templateVariable.Contains(':') ? templateVariable.Split(':')[1] : "0"; // indexer - //templateFormatPattern = (templateVariable.Contains(':')) ? (templateVariable.Split(':').Length > 2) ? templateVariable.Split(':')[2] : string.Empty : string.Empty; // format pattern - //templateTotalPattern = match.Value; // compleet pattern "${blaat:0:0.000}" - bool isFormatPresent = templateVariable.Contains(':'); string[] fields = templateVariable.Split(':'); int fieldCnt = templateVariable.Split(':').Length; @@ -281,6 +276,7 @@ private string Merge(string templateLine, string varName, string varValue, bool if (GetValueFromIntermediate(intermediate, templateVariable, out val)) // out val is leeg als GetValue hem niet gevonden heeft { returnValue = FormatValue(val, templateFormatPattern); + //Log.WriteLine(string.Format("DEBUG FormatValue src={0} format={1} result={2}", val, templateFormatPattern, returnValue)); } } } @@ -300,7 +296,7 @@ private string Merge(string templateLine, string varName, string varValue, bool returnValue = templateValueDefault; } - Log.WriteLine(string.Format("value for variable replacement ({0}): {1}->[{2}] ", reason, templateVariable, returnValue)); + Log.WriteLine(string.Format("value for variable replacement ({0}): {1} [{2}] ", reason, templateVariable, returnValue)); resultLine = resultLine.Replace(templateTotalPattern, returnValue); } } // foreach match in templateline @@ -361,23 +357,27 @@ public bool GetValueFromIntermediate(Intermediate intermediate, string templateV /// private string FormatValue(string value, string formatPattern) { - string returnValue = value; // default - string actualFormatPattern = formatPattern; + // if formatPattern is empty or has multiple occurences of separators: cancel + if ((formatPattern.Trim().Length == 0) || (formatPattern.Split('.').Length > 2) || (formatPattern.Split(',').Length > 2)) + return value; - // if floatseparator = ',', then temporarily change to '.' - bool isCommaAsFloatSep = formatPattern.Contains(","); - if (isCommaAsFloatSep) - actualFormatPattern = formatPattern.Replace(',','.'); + string returnValue = value; + string formatPattern_usable = formatPattern.Replace(',','.'); // convert formatter to usable dotnet formatter try { - if (formatPattern != string.Empty) - { - returnValue = float.Parse(value).ToString(actualFormatPattern); - returnValue = isCommaAsFloatSep ? returnValue.Replace('.', ',') : returnValue.Replace(',','.'); - } + // first convert to normal/system floating point value string + string normalizedValue = Utils.ToSystemFloatString(value); + + // this string can be safely parsed to a float, format that float with the format pattern + returnValue = float.Parse(normalizedValue).ToString(formatPattern_usable); + + // now change the standard system decimal char to the decimal char in the format pattern + returnValue = returnValue.Replace(Utils.GetDecimalChar(returnValue), Utils.GetDecimalChar(formatPattern)); + + //Log.WriteLine(string.Format("DEBUG FormatValue value={0} formatPattern={1} normalizedValue={2} formatPattern_usable={3} returnValue={4} curDecimal={5} patternDecimal={6}", value, formatPattern, normalizedValue, formatPattern_usable, returnValue, a, b)); } - catch { } + catch { return value; } // if drama: give up and return original return returnValue; } @@ -560,7 +560,7 @@ private Intermediate ReadBaselineData(string currentTestrunName, string baseline // lees baseline data Log.WriteLine("read baseline reference data..."); - baselineFound = (baselineReferenceValues.ReadFromDatabaseValue(this.project, baselineTestrunNameUsed, this.category, this.entity) > 0); + baselineFound = (baselineReferenceValues.ReadFromDatabaseValues(this.project, baselineTestrunNameUsed, this.category, this.entity) > 0); // als baseline onbekend/niet gevuld: zoek naar geschikt alternatief if ((!baselineFound) || (baselineTestrunNameUsed.Length == 0)) @@ -588,13 +588,13 @@ private Intermediate ReadBaselineData(string currentTestrunName, string baseline } // 2e poging (fallback scenario) - if (baselineReferenceValues.ReadFromDatabaseValue(this.project, baselineTestrunNameUsed, this.category, this.entity) == 0) + if (baselineReferenceValues.ReadFromDatabaseValues(this.project, baselineTestrunNameUsed, this.category, this.entity) == 0) throw new Exception(string.Format("No baseline data found ({0}/{1}/{2})", this.project, this.category, this.entity)); } // add baseline variables Log.WriteLine(string.Format("get variables from baseline [{0}]...", baselineTestrunNameUsed)); - if (intermediate.ReadFromDatabaseValue(this.project, baselineTestrunNameUsed, Category.Variable, "*", BASELINEKEYPREFIX) == 0) + if (intermediate.ReadFromDatabaseValues(this.project, baselineTestrunNameUsed, Category.Variable, "*", BASELINEKEYPREFIX) == 0) Log.WriteLine("WARNING: no variable data found for baseline"); // add chosen baseline reference to intermediate (to be merged lateron) with reason diff --git a/06_Tools/ReportTool/sources/rpg.merge/Program.cs b/06_Tools/ReportTool/sources/rpg.merge/Program.cs index 56f5aa3..714fe2f 100644 --- a/06_Tools/ReportTool/sources/rpg.merge/Program.cs +++ b/06_Tools/ReportTool/sources/rpg.merge/Program.cs @@ -75,7 +75,7 @@ static void Main(string[] args) if (_params.Function == 'i') // merge intermediate data { // read valueset for current testrun - mergeController.ReadIntermediateValue(_params.Value("project"), _params.Value("testrun"), _params.Value("category"), _params.Value("entity", "*")); + mergeController.ReadIntermediateValues(_params.Value("project"), _params.Value("testrun"), _params.Value("category"), _params.Value("entity", "*")); // Perform post-processing on data that was parsed and stored Log.WriteLine("Data post-processing phase..."); diff --git a/06_Tools/ReportTool/sources/rpg.merge/rpg.merge.csproj b/06_Tools/ReportTool/sources/rpg.merge/rpg.merge.csproj index e5a62d9..d839457 100644 --- a/06_Tools/ReportTool/sources/rpg.merge/rpg.merge.csproj +++ b/06_Tools/ReportTool/sources/rpg.merge/rpg.merge.csproj @@ -3,14 +3,14 @@ Exe netcoreapp2.1 - 4.9.3.0 + 4.10.0.0 Report Generator - merge ICTU ISR - ICTU 2019 - 4.9.3.0 - 4.9.3.0 + ICTU 2020 + 4.10.0.0 + 4.10.0.0 Merge reportgenerator data from database into HTML template diff --git a/06_Tools/ReportTool/sources/rpg.parsemeasures/JmeterMeasureController.cs b/06_Tools/ReportTool/sources/rpg.parsemeasures/JmeterMeasureController.cs index c062a2f..171fbc5 100644 --- a/06_Tools/ReportTool/sources/rpg.parsemeasures/JmeterMeasureController.cs +++ b/06_Tools/ReportTool/sources/rpg.parsemeasures/JmeterMeasureController.cs @@ -51,12 +51,9 @@ private void ExtractAdditionals(string[] jtlTrsLines) { // Time string s = Utils.ExtractValueByPatternFirst(jtlTrsLines, @"ts=(\d+)"); - //Log.WriteLine("DEBUG processing: ["+s+"]"); - //_measureDetails.Add(STARTTIMEKEY, Utils.ParseJMeterEpoch(s).ToString(DATETIMETIMEFORMAT)); _variables.Add(STARTTIMEKEY, Utils.ParseJMeterEpoch(s).ToString(DATETIMETIMEFORMAT)); // Interval; - //_measureDetails.Add(INTERVALKEY, JMAGGREGATEPERIOD.ToString()); _variables.Add(INTERVALKEY, JMAGGREGATEPERIOD.ToString()); } @@ -125,7 +122,7 @@ private void ExtractMeasureData(string[] lines) for (int a = 0; a < (timespan / JMAGGREGATEPERIOD); ++a) //for each timebucket create a datapoint { // agg -> measuredetails - _measureDetails.Add(OVERALLRESPONSETIMEKEY, Utils.jmeterTimeToSeconds(resptime_agg.Avg().ToString())); // normalize + _measureDetails.Add(OVERALLRESPONSETIMEKEY, Utils.jmeterTimeToIntermediateSecondsString(resptime_agg.Avg().ToString())); // normalize _measureDetails.Add(OVERALLTRANSACTIONSKEY, resptime_agg.Count().ToString()); _measureDetails.Add(OVERALLUSERSKEY, numofthreads_agg.Max().ToString()); _measureDetails.Add(OVERALLERRORSKEY, errors_agg.Sum().ToString()); @@ -159,7 +156,7 @@ private void ExtractMeasureData(string[] lines) if (resptime_agg.Count() > 0) { // agg -> measuredetails (laaste restje wordt toegevoegd) - _measureDetails.Add(OVERALLRESPONSETIMEKEY, Utils.jmeterTimeToSeconds(resptime_agg.Avg().ToString())); // normalize + _measureDetails.Add(OVERALLRESPONSETIMEKEY, Utils.jmeterTimeToIntermediateSecondsString(resptime_agg.Avg().ToString())); // normalize _measureDetails.Add(OVERALLTRANSACTIONSKEY, resptime_agg.Count().ToString()); _measureDetails.Add(OVERALLUSERSKEY, numofthreads_agg.Max().ToString()); _measureDetails.Add(OVERALLERRORSKEY, errors_agg.Sum().ToString()); diff --git a/06_Tools/ReportTool/sources/rpg.parsemeasures/rpg.parsemeasures.csproj b/06_Tools/ReportTool/sources/rpg.parsemeasures/rpg.parsemeasures.csproj index 0df0efa..8c78ad2 100644 --- a/06_Tools/ReportTool/sources/rpg.parsemeasures/rpg.parsemeasures.csproj +++ b/06_Tools/ReportTool/sources/rpg.parsemeasures/rpg.parsemeasures.csproj @@ -6,10 +6,10 @@ ISR ICTU Report Generator - parse measures - 4.9.3.0 - 4.9.1.0 - 4.9.1.0 - ICTU 2019 + 4.10.0.0 + 4.10.0.0 + 4.10.0.0 + ICTU 2020 Parse raw loadgenerator measure data into intermediate format (file based) diff --git a/06_Tools/ReportTool/sources/rpg.parsetransactions/JmeterTransactionController.cs b/06_Tools/ReportTool/sources/rpg.parsetransactions/JmeterTransactionController.cs index 2f40664..4d999f0 100644 --- a/06_Tools/ReportTool/sources/rpg.parsetransactions/JmeterTransactionController.cs +++ b/06_Tools/ReportTool/sources/rpg.parsetransactions/JmeterTransactionController.cs @@ -85,6 +85,7 @@ private TransactionDetails ReadTransactionDetailsFromCSV(string[] lines, string[ foreach (string line in lines) { trsName = Utils.NormalizeTransactionName(line.Split(',')[0]); + if (trsNames.Contains(trsName)) { TransactionValue value = ExtractTrsDetailsCSV(line); @@ -111,17 +112,16 @@ private TransactionValue ExtractTrsDetailsCSV(string line) value.cnt = parts[1]; string cntExecuted = parts[1]; - value.avg = Utils.jmeterTimeToSeconds(parts[2]); - value.median = Utils.jmeterTimeToSeconds(parts[3]); - value.p90 = Utils.jmeterTimeToSeconds(parts[4]); - value.p95 = Utils.jmeterTimeToSeconds(parts[5]); + value.avg = Utils.jmeterTimeToIntermediateSecondsString(parts[2]); + value.median = Utils.jmeterTimeToIntermediateSecondsString(parts[3]); + value.p90 = Utils.jmeterTimeToIntermediateSecondsString(parts[4]); + value.p95 = Utils.jmeterTimeToIntermediateSecondsString(parts[5]); //6=99p not present in csv but not really useable as an application perf metric - value.min = Utils.jmeterTimeToSeconds(parts[7]); - value.max = Utils.jmeterTimeToSeconds(parts[8]); + value.min = Utils.jmeterTimeToIntermediateSecondsString(parts[7]); + value.max = Utils.jmeterTimeToIntermediateSecondsString(parts[8]); - // convert fail from % to count - value.fail = NormalizeFail(Utils.NormalizeFloat(parts[9].TrimEnd('%')), cntExecuted); - value.stdev = Utils.jmeterTimeToSeconds(parts[12]); + value.fail = NormalizeFail(Utils.NormalizeFloatString(parts[9].TrimEnd('%')), cntExecuted); + value.stdev = Utils.jmeterTimeToIntermediateSecondsString(parts[12]); return value; } diff --git a/06_Tools/ReportTool/sources/rpg.parsetransactions/TransactionController.cs b/06_Tools/ReportTool/sources/rpg.parsetransactions/TransactionController.cs index a1085d7..adb9d88 100644 --- a/06_Tools/ReportTool/sources/rpg.parsetransactions/TransactionController.cs +++ b/06_Tools/ReportTool/sources/rpg.parsetransactions/TransactionController.cs @@ -97,10 +97,10 @@ public void GenerateAggregates(ParamInterpreter parameters) _transactionDetails.Add(AGGREGATEDTRSNAME, transactionAggregate.ToString()); // isolate most important values as variable for history graph -> measure format (later to variable category?) - _variables.Add(AVGOF90PERCENTILES, Utils.ToMeasureFormat(transactionAggregate.p90)); - _variables.Add(AVGOFMEDIAN, Utils.ToMeasureFormat(transactionAggregate.median)); - _variables.Add(AVGOF95PERCENTILES, Utils.ToMeasureFormat(transactionAggregate.p95)); - _variables.Add(AVGOFAVERAGES, Utils.ToMeasureFormat(transactionAggregate.avg)); + _variables.Add(AVGOF90PERCENTILES, Utils.ToMeasureFormatString(transactionAggregate.p90)); + _variables.Add(AVGOFMEDIAN, Utils.ToMeasureFormatString(transactionAggregate.median)); + _variables.Add(AVGOF95PERCENTILES, Utils.ToMeasureFormatString(transactionAggregate.p95)); + _variables.Add(AVGOFAVERAGES, Utils.ToMeasureFormatString(transactionAggregate.avg)); _variables.Add(TRANSACTIONSTOTAL, transactionAggregate.cnt); _variables.Add(TRANSACTIONSFAILED, transactionAggregate.fail); @@ -183,13 +183,14 @@ public void WriteIntermediate(ParamInterpreter parameters) /// /// Format the data to current culture format (make it easy to calculate) + /// changed: format any input float to intermediate format float /// public void FormatData() { Log.WriteLine("Formatting data (decimal separator)..."); foreach (string trsName in _transactionNames) { - _transactionDetails.items[trsName] = Utils.NormalizeFloatString(_transactionDetails.items[trsName]); + _transactionDetails.items[trsName] = Utils.ToIntermediateFloatString(_transactionDetails.items[trsName]); } } diff --git a/06_Tools/ReportTool/sources/rpg.parsetransactions/rpg.parsetransactions.csproj b/06_Tools/ReportTool/sources/rpg.parsetransactions/rpg.parsetransactions.csproj index d28db11..cf0b85b 100644 --- a/06_Tools/ReportTool/sources/rpg.parsetransactions/rpg.parsetransactions.csproj +++ b/06_Tools/ReportTool/sources/rpg.parsetransactions/rpg.parsetransactions.csproj @@ -3,14 +3,14 @@ Exe netcoreapp2.1 - 4.9.3.0 + 4.10.0.0 ISR ICTU Report Generator - parse transactions - ICTU 2019 + ICTU 2020 - 4.6.0.0 - 4.6.0.0 + 4.10.0.0 + 4.10.0.0 Parse raw loadgenerator transaction data into intermediate format (file based) diff --git a/06_Tools/ReportTool/sources/rpg.parsevariables/JmeterVariableController.cs b/06_Tools/ReportTool/sources/rpg.parsevariables/JmeterVariableController.cs index 706c3cc..1b2cada 100644 --- a/06_Tools/ReportTool/sources/rpg.parsevariables/JmeterVariableController.cs +++ b/06_Tools/ReportTool/sources/rpg.parsevariables/JmeterVariableController.cs @@ -6,7 +6,7 @@ namespace rpg.parsevariables { class JmeterVariableController: VariableController { - private const string FAULTPERCENTAGEPATTERN = @"TOTAL.+""(\d+[,.]\d+)%"; //@"TOTAL.*""(\d+,\d+)%"; + private const string FAULTPERCENTAGEPATTERN = @"TOTAL.+(\d+[,.]\d+)%"; //@"TOTAL.*""(\d+,\d+)%"; // 20200204 private const string TESTENDTIMEPATTERN = @"ts=""(\d+)"; private const string TESTSTARTTIMEPATTERN = @"ts=""(\d+)"; private const string MERGEDUSERSPATTERN = @"na=""(\d+)"""; @@ -92,17 +92,17 @@ public override string ParseFaultPercentage() { Log.WriteLine("parse faultpercentage..."); // 10th position of - //TOTAL,82726,314,90,634,1122,2277,0,435097,"0,25%","22,8","940,6","3480,81" + //TOTAL,82726,314,90,634,1122,2277,0,435097,"0,25%","22,8","940,6","3480,81" [NL] + //TOTAL,82833,249,91,418,815,2096,3,247772,0.02%,22.6,2108.0,2810.89 [ENG] string val = "0"; try { - // dit kan mis gaan afh van regional settings van werkstation waarop conversie naar CSV wordt gedaan (. of , als decimalseparator en als deze hetzelfde is als fieldseparator worden dubbelequotes toegevoegd) - // voor nu regex pattern ongevoelig gemaakt voor aanwezigheid van " en van . of , + // let op, gevoelig voor CSV export format oiv SystemLoale settings val = Utils.ExtractValueByPatternLast(csvLines, FAULTPERCENTAGEPATTERN); } catch { } - return Utils.ToMeasureFormat(val); //val.Replace(",", "."); + return Utils.ToMeasureFormatString(val); // replace , to . } } diff --git a/06_Tools/ReportTool/sources/rpg.parsevariables/rpg.parsevariables.csproj b/06_Tools/ReportTool/sources/rpg.parsevariables/rpg.parsevariables.csproj index 794e0a8..dd3410d 100644 --- a/06_Tools/ReportTool/sources/rpg.parsevariables/rpg.parsevariables.csproj +++ b/06_Tools/ReportTool/sources/rpg.parsevariables/rpg.parsevariables.csproj @@ -3,14 +3,14 @@ Exe netcoreapp2.1 - 4.9.3.0 + 4.10.0.0 ISR ICTU Report Generator - parse variables - ICTU 2019 - 4.3.0.0 - 4.3.0.0 + ICTU 2020 + 4.10.0.0 + 4.10.0.0 Parse raw loadgenerator variable data into intermediate format (file based) diff --git a/06_Tools/ReportTool/sources/rpg.releasenotes.txt b/06_Tools/ReportTool/sources/rpg.releasenotes.txt index a44362c..7f642f6 100644 --- a/06_Tools/ReportTool/sources/rpg.releasenotes.txt +++ b/06_Tools/ReportTool/sources/rpg.releasenotes.txt @@ -2,6 +2,9 @@ RPG (RePortGenerator tools) release notes Replaces platform independent .NetCore Silk Result Tools (srt) +4.10.0.0 +5-2-2020 reportgenerator made independent from operating system number format settings + 4.9.3.0 11-12-2019 threshold choise added to the log 12-12-2019 start- and endtime logged per application diff --git a/06_Tools/ReportTool/tools/rpg.common.dll b/06_Tools/ReportTool/tools/rpg.common.dll index 340c5ea..2827ff0 100644 Binary files a/06_Tools/ReportTool/tools/rpg.common.dll and b/06_Tools/ReportTool/tools/rpg.common.dll differ diff --git a/06_Tools/ReportTool/tools/rpg.common.pdb b/06_Tools/ReportTool/tools/rpg.common.pdb index 313b15d..85abd91 100644 Binary files a/06_Tools/ReportTool/tools/rpg.common.pdb and b/06_Tools/ReportTool/tools/rpg.common.pdb differ diff --git a/06_Tools/ReportTool/tools/rpg.console.deps.json b/06_Tools/ReportTool/tools/rpg.console.deps.json index 8e6400d..b13da57 100644 --- a/06_Tools/ReportTool/tools/rpg.console.deps.json +++ b/06_Tools/ReportTool/tools/rpg.console.deps.json @@ -6,9 +6,9 @@ "compilationOptions": {}, "targets": { ".NETCoreApp,Version=v2.1": { - "rpg.console/4.9.3.0": { + "rpg.console/4.10.0.0": { "dependencies": { - "rpg.common": "4.9.3" + "rpg.common": "4.10.0" }, "runtime": { "rpg.console.dll": {} @@ -397,7 +397,7 @@ }, "System.Threading.Tasks.Extensions/4.5.1": {}, "System.ValueTuple/4.5.0": {}, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "dependencies": { "Npgsql.EntityFrameworkCore.PostgreSQL": "2.2.0" }, @@ -408,7 +408,7 @@ } }, "libraries": { - "rpg.console/4.9.3.0": { + "rpg.console/4.10.0.0": { "type": "project", "serviceable": false, "sha512": "" @@ -742,7 +742,7 @@ "path": "system.valuetuple/4.5.0", "hashPath": "system.valuetuple.4.5.0.nupkg.sha512" }, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "type": "project", "serviceable": false, "sha512": "" diff --git a/06_Tools/ReportTool/tools/rpg.console.dll b/06_Tools/ReportTool/tools/rpg.console.dll index 146143d..8108fd7 100644 Binary files a/06_Tools/ReportTool/tools/rpg.console.dll and b/06_Tools/ReportTool/tools/rpg.console.dll differ diff --git a/06_Tools/ReportTool/tools/rpg.loadintermediate.deps.json b/06_Tools/ReportTool/tools/rpg.loadintermediate.deps.json index 9ee48a2..b092f0a 100644 --- a/06_Tools/ReportTool/tools/rpg.loadintermediate.deps.json +++ b/06_Tools/ReportTool/tools/rpg.loadintermediate.deps.json @@ -6,9 +6,9 @@ "compilationOptions": {}, "targets": { ".NETCoreApp,Version=v2.1": { - "rpg.loadintermediate/4.9.3.0": { + "rpg.loadintermediate/4.10.0.0": { "dependencies": { - "rpg.common": "4.9.3" + "rpg.common": "4.10.0" }, "runtime": { "rpg.loadintermediate.dll": {} @@ -397,7 +397,7 @@ }, "System.Threading.Tasks.Extensions/4.5.1": {}, "System.ValueTuple/4.5.0": {}, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "dependencies": { "Npgsql.EntityFrameworkCore.PostgreSQL": "2.2.0" }, @@ -408,7 +408,7 @@ } }, "libraries": { - "rpg.loadintermediate/4.9.3.0": { + "rpg.loadintermediate/4.10.0.0": { "type": "project", "serviceable": false, "sha512": "" @@ -742,7 +742,7 @@ "path": "system.valuetuple/4.5.0", "hashPath": "system.valuetuple.4.5.0.nupkg.sha512" }, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "type": "project", "serviceable": false, "sha512": "" diff --git a/06_Tools/ReportTool/tools/rpg.loadintermediate.dll b/06_Tools/ReportTool/tools/rpg.loadintermediate.dll index cc32485..c3acd67 100644 Binary files a/06_Tools/ReportTool/tools/rpg.loadintermediate.dll and b/06_Tools/ReportTool/tools/rpg.loadintermediate.dll differ diff --git a/06_Tools/ReportTool/tools/rpg.merge.deps.json b/06_Tools/ReportTool/tools/rpg.merge.deps.json index 984cab0..3dc2bb3 100644 --- a/06_Tools/ReportTool/tools/rpg.merge.deps.json +++ b/06_Tools/ReportTool/tools/rpg.merge.deps.json @@ -6,9 +6,9 @@ "compilationOptions": {}, "targets": { ".NETCoreApp,Version=v2.1": { - "rpg.merge/4.9.3.0": { + "rpg.merge/4.10.0.0": { "dependencies": { - "rpg.common": "4.9.3" + "rpg.common": "4.10.0" }, "runtime": { "rpg.merge.dll": {} @@ -397,7 +397,7 @@ }, "System.Threading.Tasks.Extensions/4.5.1": {}, "System.ValueTuple/4.5.0": {}, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "dependencies": { "Npgsql.EntityFrameworkCore.PostgreSQL": "2.2.0" }, @@ -408,7 +408,7 @@ } }, "libraries": { - "rpg.merge/4.9.3.0": { + "rpg.merge/4.10.0.0": { "type": "project", "serviceable": false, "sha512": "" @@ -742,7 +742,7 @@ "path": "system.valuetuple/4.5.0", "hashPath": "system.valuetuple.4.5.0.nupkg.sha512" }, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "type": "project", "serviceable": false, "sha512": "" diff --git a/06_Tools/ReportTool/tools/rpg.merge.dll b/06_Tools/ReportTool/tools/rpg.merge.dll index cec667e..705ee1e 100644 Binary files a/06_Tools/ReportTool/tools/rpg.merge.dll and b/06_Tools/ReportTool/tools/rpg.merge.dll differ diff --git a/06_Tools/ReportTool/tools/rpg.merge.pdb b/06_Tools/ReportTool/tools/rpg.merge.pdb index 17b6ccc..d89a4b4 100644 Binary files a/06_Tools/ReportTool/tools/rpg.merge.pdb and b/06_Tools/ReportTool/tools/rpg.merge.pdb differ diff --git a/06_Tools/ReportTool/tools/rpg.parsemeasures.deps.json b/06_Tools/ReportTool/tools/rpg.parsemeasures.deps.json index b008f48..b144514 100644 --- a/06_Tools/ReportTool/tools/rpg.parsemeasures.deps.json +++ b/06_Tools/ReportTool/tools/rpg.parsemeasures.deps.json @@ -6,9 +6,9 @@ "compilationOptions": {}, "targets": { ".NETCoreApp,Version=v2.1": { - "rpg.parsemeasures/4.9.3.0": { + "rpg.parsemeasures/4.10.0.0": { "dependencies": { - "rpg.common": "4.9.3" + "rpg.common": "4.10.0" }, "runtime": { "rpg.parsemeasures.dll": {} @@ -397,7 +397,7 @@ }, "System.Threading.Tasks.Extensions/4.5.1": {}, "System.ValueTuple/4.5.0": {}, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "dependencies": { "Npgsql.EntityFrameworkCore.PostgreSQL": "2.2.0" }, @@ -408,7 +408,7 @@ } }, "libraries": { - "rpg.parsemeasures/4.9.3.0": { + "rpg.parsemeasures/4.10.0.0": { "type": "project", "serviceable": false, "sha512": "" @@ -742,7 +742,7 @@ "path": "system.valuetuple/4.5.0", "hashPath": "system.valuetuple.4.5.0.nupkg.sha512" }, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "type": "project", "serviceable": false, "sha512": "" diff --git a/06_Tools/ReportTool/tools/rpg.parsemeasures.dll b/06_Tools/ReportTool/tools/rpg.parsemeasures.dll index e56e547..7e5e96b 100644 Binary files a/06_Tools/ReportTool/tools/rpg.parsemeasures.dll and b/06_Tools/ReportTool/tools/rpg.parsemeasures.dll differ diff --git a/06_Tools/ReportTool/tools/rpg.parsemeasures.pdb b/06_Tools/ReportTool/tools/rpg.parsemeasures.pdb index c1c4266..d4dcc1e 100644 Binary files a/06_Tools/ReportTool/tools/rpg.parsemeasures.pdb and b/06_Tools/ReportTool/tools/rpg.parsemeasures.pdb differ diff --git a/06_Tools/ReportTool/tools/rpg.parsetransactions.deps.json b/06_Tools/ReportTool/tools/rpg.parsetransactions.deps.json index 2c17fe2..616e379 100644 --- a/06_Tools/ReportTool/tools/rpg.parsetransactions.deps.json +++ b/06_Tools/ReportTool/tools/rpg.parsetransactions.deps.json @@ -6,9 +6,9 @@ "compilationOptions": {}, "targets": { ".NETCoreApp,Version=v2.1": { - "rpg.parsetransactions/4.9.3.0": { + "rpg.parsetransactions/4.10.0.0": { "dependencies": { - "rpg.common": "4.9.3" + "rpg.common": "4.10.0" }, "runtime": { "rpg.parsetransactions.dll": {} @@ -397,7 +397,7 @@ }, "System.Threading.Tasks.Extensions/4.5.1": {}, "System.ValueTuple/4.5.0": {}, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "dependencies": { "Npgsql.EntityFrameworkCore.PostgreSQL": "2.2.0" }, @@ -408,7 +408,7 @@ } }, "libraries": { - "rpg.parsetransactions/4.9.3.0": { + "rpg.parsetransactions/4.10.0.0": { "type": "project", "serviceable": false, "sha512": "" @@ -742,7 +742,7 @@ "path": "system.valuetuple/4.5.0", "hashPath": "system.valuetuple.4.5.0.nupkg.sha512" }, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "type": "project", "serviceable": false, "sha512": "" diff --git a/06_Tools/ReportTool/tools/rpg.parsetransactions.dll b/06_Tools/ReportTool/tools/rpg.parsetransactions.dll index a7bda40..bd798b4 100644 Binary files a/06_Tools/ReportTool/tools/rpg.parsetransactions.dll and b/06_Tools/ReportTool/tools/rpg.parsetransactions.dll differ diff --git a/06_Tools/ReportTool/tools/rpg.parsetransactions.pdb b/06_Tools/ReportTool/tools/rpg.parsetransactions.pdb index 38a97d0..f089374 100644 Binary files a/06_Tools/ReportTool/tools/rpg.parsetransactions.pdb and b/06_Tools/ReportTool/tools/rpg.parsetransactions.pdb differ diff --git a/06_Tools/ReportTool/tools/rpg.parsevariables.deps.json b/06_Tools/ReportTool/tools/rpg.parsevariables.deps.json index e8f7837..4ac7ca9 100644 --- a/06_Tools/ReportTool/tools/rpg.parsevariables.deps.json +++ b/06_Tools/ReportTool/tools/rpg.parsevariables.deps.json @@ -6,9 +6,9 @@ "compilationOptions": {}, "targets": { ".NETCoreApp,Version=v2.1": { - "rpg.parsevariables/4.9.3.0": { + "rpg.parsevariables/4.10.0.0": { "dependencies": { - "rpg.common": "4.9.3" + "rpg.common": "4.10.0" }, "runtime": { "rpg.parsevariables.dll": {} @@ -397,7 +397,7 @@ }, "System.Threading.Tasks.Extensions/4.5.1": {}, "System.ValueTuple/4.5.0": {}, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "dependencies": { "Npgsql.EntityFrameworkCore.PostgreSQL": "2.2.0" }, @@ -408,7 +408,7 @@ } }, "libraries": { - "rpg.parsevariables/4.9.3.0": { + "rpg.parsevariables/4.10.0.0": { "type": "project", "serviceable": false, "sha512": "" @@ -742,7 +742,7 @@ "path": "system.valuetuple/4.5.0", "hashPath": "system.valuetuple.4.5.0.nupkg.sha512" }, - "rpg.common/4.9.3": { + "rpg.common/4.10.0": { "type": "project", "serviceable": false, "sha512": "" diff --git a/06_Tools/ReportTool/tools/rpg.parsevariables.dll b/06_Tools/ReportTool/tools/rpg.parsevariables.dll index bc64c90..2a35c73 100644 Binary files a/06_Tools/ReportTool/tools/rpg.parsevariables.dll and b/06_Tools/ReportTool/tools/rpg.parsevariables.dll differ diff --git a/06_Tools/ReportTool/tools/rpg.parsevariables.pdb b/06_Tools/ReportTool/tools/rpg.parsevariables.pdb index d530d21..a878e45 100644 Binary files a/06_Tools/ReportTool/tools/rpg.parsevariables.pdb and b/06_Tools/ReportTool/tools/rpg.parsevariables.pdb differ diff --git a/06_Tools/ReportTool/tools/rpg.releasenotes.txt b/06_Tools/ReportTool/tools/rpg.releasenotes.txt index a44362c..7f642f6 100644 --- a/06_Tools/ReportTool/tools/rpg.releasenotes.txt +++ b/06_Tools/ReportTool/tools/rpg.releasenotes.txt @@ -2,6 +2,9 @@ RPG (RePortGenerator tools) release notes Replaces platform independent .NetCore Silk Result Tools (srt) +4.10.0.0 +5-2-2020 reportgenerator made independent from operating system number format settings + 4.9.3.0 11-12-2019 threshold choise added to the log 12-12-2019 start- and endtime logged per application