From f6f7fbf8a136aba23575726d6ae026604ef27df4 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Wed, 13 Nov 2024 18:17:58 +0100 Subject: [PATCH] try using micro seconds --- custom/benchmark/index.cfm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/custom/benchmark/index.cfm b/custom/benchmark/index.cfm index 67e4676..376f93c 100644 --- a/custom/benchmark/index.cfm +++ b/custom/benchmark/index.cfm @@ -17,6 +17,7 @@ _memBefore = reportMem( "", {}, "before", "HEAP" ); errorCount = 0; + units = "micro"; sleep( 2000 ); // initial time to settle @@ -40,14 +41,14 @@ sleep( 2000 ); // time to settle systemOutput( "Running #type# [#numberFormat( runs )#] times, inspect: [#inspect#]", true ); - s = getTickCount(); + s = getTickCount(units); ArrayEach( arr, function( item, idx, _arr ){ var start = getTickCount(); _internalRequest( template: template ); - arguments._arr[ arguments.idx ] = getTickCount() - start; + arguments._arr[ arguments.idx ] = getTickCount(units) - start; }, true ); } catch ( e ){ systemOutput( e, true ); @@ -57,9 +58,9 @@ errorCount++; } - time = getTickCount()-s; + time = getTickCount(units)-s; - _logger( "Running #type# [#numberFormat( runs )#] times, inspect: [#inspect#] took #numberFormat( time )# ms, or #numberFormat(runs/(time/1000))# per second" ); + _logger( "Running #type# [#numberFormat( runs )#] times, inspect: [#inspect#] took #numberFormat( time )# ms, or #numberFormat(runs/(time/1000/1000))# per second" ); ArrayAppend( results.data, { time: time, inspect: inspect,