Skip to content

Instantly share code, notes, and snippets.

@owenallenaz
Created October 21, 2012 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save owenallenaz/3928103 to your computer and use it in GitHub Desktop.
Save owenallenaz/3928103 to your computer and use it in GitHub Desktop.
Performance testing coldfusion - the importance of the debugger
component {
this.name = "testingApp";
public function onRequestStart() {
Application.component1 = CreateObject("component1");
Application.component2 = CreateObject("component2");
Application.component3 = CreateObject("component3");
}
}
component {
public function call() {
return Application.component2.call();
}
}
component {
public function call() {
return "test";
}
}
component {
public function call() {
return test();
}
public function test() {
return "test";
}
}
<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