Created
October 21, 2012 19:02
-
-
Save owenallenaz/3928103 to your computer and use it in GitHub Desktop.
Performance testing coldfusion - the importance of the debugger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
this.name = "testingApp"; | |
public function onRequestStart() { | |
Application.component1 = CreateObject("component1"); | |
Application.component2 = CreateObject("component2"); | |
Application.component3 = CreateObject("component3"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
public function call() { | |
return Application.component2.call(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
public function call() { | |
return "test"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
public function call() { | |
return test(); | |
} | |
public function test() { | |
return "test"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfsetting showdebugoutput="no"> | |
<cfset local.start = getTickCount()> | |
<cfloop from="1" to="1000" index="local.i"> | |
<cfset Application.component1.call()> | |
</cfloop> | |
<cfoutput>Test 1 - #getTickCount() - local.start#</cfoutput> | |
<br/> | |
<cfset local.start = getTickCount()> | |
<cfloop from="1" to="1000" index="local.i"> | |
<cfset Application.component3.call()> | |
</cfloop> | |
<cfoutput>Test 2 - #getTickCount() - local.start#</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment