pauldick 01/03/15 08:36:06
Modified: c/Tests/Performance perf.cpp
Log:
Renamed metric names, other minor changes to sync with how
java performance is being done.
Revision Changes Path
1.14 +23 -16 xml-xalan/c/Tests/Performance/perf.cpp
Index: perf.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/Tests/Performance/perf.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- perf.cpp 2001/03/09 22:10:10 1.13
+++ perf.cpp 2001/03/15 16:36:01 1.14
@@ -121,10 +121,10 @@
const char* const excludeStylesheets[] =
{
-// "basic-all_well.xml",
+ //"basic-all_well.xsl",
"large-evans_large.xsl",
-// "sort-cem-big.xml",
-// "large-cem10k.xml",
+ //"sort-cem-big.xsl",
+ //"large-cem10k.xsl",
0
};
@@ -317,13 +317,18 @@
FileUtility f;
+ // Generate Unique Run id and processor info
+ const XalanDOMString UniqRunid = f.GenerateUniqRunid();
+
+ const XalanDOMString
processorType(XALAN_STATIC_UCODE_STRING("XalanC"));
+
// Defined root for performance directory. Based on PD's
machine.
const XalanDOMString
perfDir(XALAN_STATIC_UCODE_STRING("d:\\xslt\\xsl-test\\perf\\"));
// Get the list of Directories that are below perf
const FileNameVectorType dirs = f.getDirectoryNames(perfDir);
- XMLFileReporter logFile("d:\\xslt\\cperf-results\\cpp.xml");
+ XMLFileReporter
logFile("d:\\xslt\\xsl-test\\perf-dataxml\\cpp.xml");
logFile.logTestFileInit("Performance Testing - Reports
performance times for single transform, and average for multiple transforms
using compiled stylesheet");
@@ -352,7 +357,9 @@
Hashtable attrs;
attrs.insert(Hashtable::value_type(XalanDOMString("idref"), files[i]));
-
+
attrs.insert(Hashtable::value_type(XalanDOMString("UniqRunid"),UniqRunid));
+
attrs.insert(Hashtable::value_type(XalanDOMString("processor"),processorType));
+
if (skip)
{
if
(checkForExclusion(files[i]))
@@ -415,7 +422,7 @@
// Calculate & report
performance on stylesheet parse to console and log file.
timeinMilliseconds =
calculateElapsedTime(startTime, endTime);
cout << " XSL parse: " <<
timeinMilliseconds << " milliseconds." << endl;
-
addMetricToAttrs("Parse_XSL",timeinMilliseconds, attrs);
+
addMetricToAttrs("parsexsl",timeinMilliseconds, attrs);
// Parse the input XML and
report how long it took...
@@ -428,7 +435,7 @@
// Calculate & report
performance on source document parse to console and log file.
timeinMilliseconds =
calculateElapsedTime(startTime, endTime);
cout << " XML parse: " <<
timeinMilliseconds << " milliseconds." << endl;
-
addMetricToAttrs("Parse_XML",timeinMilliseconds, attrs);
+
addMetricToAttrs("parsexml",timeinMilliseconds, attrs);
@@ -454,17 +461,17 @@
psExecutionContext,
csProcessor);
- // Output single transform time
to console and result log
+ // Output single etoe transform
time to console and result log
cout << " Single eTOe: " <<
etoetran << " milliseconds." << endl;
- addMetricToAttrs("eTOe",
etoetran, attrs);
+ addMetricToAttrs("etoe",
etoetran, attrs);
- // Perform a single transform
using compiled stylesheet and report results...
+ // Perform a single transform
using parsed stylesheet and unparsed xml source, report results...
csProcessor.setStylesheetRoot(glbStylesheetRoot);
- const XSLTInputSource
csSourceDocument(glbSourceXML);
+ //const XSLTInputSource
csSourceDocument(glbSourceXML);
startTime = clock();
-
csProcessor.process(csSourceDocument,
+
csProcessor.process(xmlInputSource,
theResultTarget,
psExecutionContext);
endTime = clock();
@@ -474,7 +481,7 @@
// Output single transform time
to console and result log
cout << " One transform
w/Parsed XSL: " << timeinMilliseconds << " milliseconds." << endl;
-
addMetricToAttrs("Single_Transform",timeinMilliseconds, attrs);
+
addMetricToAttrs("single",timeinMilliseconds, attrs);
@@ -500,7 +507,7 @@
// Output average transform
time to console and result log
cout << " Avg: " <<
theAverage << " for " << iterCount << " iter's w/Parsed XML" << endl;
-
addMetricToAttrs("Avg_Parsed_XML",theAverage, attrs);
+
addMetricToAttrs("avgparsedxml",theAverage, attrs);
// SECOND: Parsed Stylesheet
and UnParsed XML Source.
// This is currently how the
XalanJ 2.0 is performing transforms,
@@ -521,7 +528,7 @@
theAverage =
calculateAvgTime(accmTime, iterCount);
cout << " Avg: " <<
theAverage << " for " << iterCount << " iter's w/UnParsed XML" << endl;
-
addMetricToAttrs("Avg_UnParsed_XML",theAverage, attrs);
+
addMetricToAttrs("avgunparsedxml",theAverage, attrs);
// THIRD: Neither Stylesheet
nor XML Source are parsed.
// Perform multiple etoe
transforms and calculate the average ...
@@ -544,7 +551,7 @@
// Output average transform
time to console and result log
cout << " Avg: " <<
theAverage << " for " << iterCount << " iter's of eToe" << endl;
-
addMetricToAttrs("Avg_eTOe",theAverage, attrs);
+
addMetricToAttrs("avgetoe",theAverage, attrs);
logFile.logElement(10, "perf",
attrs, "xxx");
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]