diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 3175be3..4c5312d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - luceeVersion: [ 5.4/snapshot/light, 6.0/snapshot/light, 6.1/snapshot/light, 6.2.0.159/snapshot/light ] + luceeVersion: [ 5.4/snapshot/light, 6.0/snapshot/light, 6.1/snapshot/light, 6.2/snapshot/light ] javaVersion: [ 11, 21 ] exclude: - luceeVersion: 5.4/snapshot/light diff --git a/custom/benchmark/index.cfm b/custom/benchmark/index.cfm index 3b73ce6..f59187b 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(); + var start = getTickCount(units); _internalRequest( template: template ); - arguments._arr[ arguments.idx ] = getTickCount() - start; + arguments._arr[ arguments.idx ] = getTickCount(units) - start; }, true ); } catch ( e ){ systemOutput( e, true ); @@ -57,16 +58,16 @@ 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/1000 )# ms, or #numberFormat(runs/(time/1000/1000))# per second" ); ArrayAppend( results.data, { - time: time, + time: time/1000, inspect: inspect, type: type, - _min: int( arrayMin( arr ) ), - _max: int( arrayMax( arr ) ), - _avg: int( arrayAvg( arr ) ), + _min: decimalFormat( arrayMin( arr )/ 1000 ), + _max: decimalFormat( arrayMax( arr )/ 1000 ), + _avg: decimalFormat( arrayAvg( arr )/ 1000 ), error: runError }); }