Skip to content

Commit

Permalink
try using micro seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Nov 13, 2024
1 parent c06eafb commit f6f7fbf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions custom/benchmark/index.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
_memBefore = reportMem( "", {}, "before", "HEAP" );
errorCount = 0;
units = "micro";
sleep( 2000 ); // initial time to settle
Expand All @@ -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 );
Expand All @@ -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,
Expand Down

0 comments on commit f6f7fbf

Please sign in to comment.