From e92a989263fc5b5625679954cf503292453ae991 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Fri, 13 Dec 2024 13:12:14 +0100 Subject: [PATCH] benchmark keyImpl to string --- custom/benchmark/Application.cfc | 11 ++++++++--- custom/benchmark/tests/toStringKey.cfm | 11 +++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 custom/benchmark/tests/toStringKey.cfm diff --git a/custom/benchmark/Application.cfc b/custom/benchmark/Application.cfc index d43611c..7acf440 100644 --- a/custom/benchmark/Application.cfc +++ b/custom/benchmark/Application.cfc @@ -5,8 +5,8 @@ component { application.testSuite = [ "hello-world" , "json" - , "db" - , "qoq-hsqldb" + //, "db" + //, "qoq-hsqldb" , "json-date" , "date-format" , "set-cookie" @@ -15,10 +15,15 @@ component { , "loops" , "primes" , "toString" - , "xml" + , "toStringKey" + , "xml" , "member-java" , "member-cfml" ]; + + application.testSuite = [ + "toStringKey" + ]; } function onRequestStart(){ diff --git a/custom/benchmark/tests/toStringKey.cfm b/custom/benchmark/tests/toStringKey.cfm new file mode 100644 index 0000000..af96bd2 --- /dev/null +++ b/custom/benchmark/tests/toStringKey.cfm @@ -0,0 +1,11 @@ + + samples = { + key: createObject("java", "lucee.runtime.type.KeyImpl").init("zac") + } + for (s in samples){ + loop times=1000000 { + echo(samples[s].toString()); + if (not samples[s]) echo(1) + } + } + \ No newline at end of file