Skip to content

Commit

Permalink
LDEV-5158 testcase for query.toString() performance
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Dec 10, 2024
1 parent ce19f78 commit 9b548ae
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/tickets/LDEV5158.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
component extends="org.lucee.cfml.test.LuceeTestCase" labels="query" {

function testQueryToString(){
loop times=5 {
loop list="10,100,1000,10000" item="local.size" {
systemOutput("", true);
systemOutput("Query.toString() with #numberFormat(size)# rows", true);
var a = queryNew( "id,name,created,updated" );
loop times="#size#" {
var r = queryAddRow( a );
querySetCell(a, "id", repeatString(r,18), r)
}
var s = getTickCount();
var aa = a.toString();
systemOutput("string length: " & numberFormat(len(aa)) & " in #numberformat(getTickCount()-s)# ms ", true);
systemOutput("", true);
}
}
}

}

0 comments on commit 9b548ae

Please sign in to comment.