Speed Test For Cold Fusion
I stumbled upon this webpage
http://blog.kukiel.net/2009/07/coldfusion-8-9-and-railo-object.html that had a nice little test it was doing against CF8, CF9, Open BlueDragon and Railo.
I made some mods to the code
The code is attached in the zip file.
SpeedTest.cfm
<html>
<title>SpeedTest</title>
<cfscript>
numObjects = 10000;
writeOutput("NumObjects: ");
writeOutput(numObjects);
writeOutput("<br/>");
start = getTickCount();
for (i=0; i<numObjects; i++) {
createObject("component","test").init();
}
end = getTickCount();
seconds = (end - start) / 1000;
objectsPerSecond = numObjects / seconds;
writeOutput("Seconds: ");
writeOutput(seconds);
writeOutput("<br/>");
writeOutput("ObjPerSec: ");
writeOutput(objectsPerSecond);
writeOutput("<br/>");
</cfscript>
<body>
speed test
<br />
</body>
</html>
|
test.cfc
<cfcomponent output="false">
<cffunction name="init" output="false">
<cfreturn>
</cffunction>
</cfcomponent>
|