Skip to content

Commit

Permalink
improve reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jul 20, 2024
1 parent 3fdaad2 commit 61ccc06
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
extensions: 7E673D15-D87C-41A6-8B5F1956528C605F #mysql
luceeVersionQuery: ${{ matrix.luceeVersion }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: results-${{ strategy.job-index }}
path: ${{ github.workspace }}/custom/benchmark/artifacts
Expand Down
29 changes: 15 additions & 14 deletions custom/benchmark/index.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,29 @@
configImport( {"inspectTemplate": inspect }, "server", "admin" );
loop list="#application.testSuite.toList()#" item="type" {
template = "/tests/#type#.cfm"
ArrayEach( warmup, function( item ){
_internalRequest(
template: template
);
}, true );
systemOutput( "Sleeping 2s first, after warmup", true );
sleep( 2000 ); // time to settle
systemOutput( "Running #type# [#numberFormat( runs )#] times, inspect: [#inspect#]", true );
s = getTickCount();
template = "/tests/#type#.cfm";
runError = "";
arr = [];
ArraySet( arr, 1, runs, 0 );
try {
ArrayEach( arr, function( item, idx, array ){
systemOutput( "Warmup #type#, inspect: [#inspect#]", true );
ArrayEach( warmup, function( item ){
_internalRequest(
template: template
);
}, true );
systemOutput( "Sleeping 2s first, after warmup", true );
sleep( 2000 ); // time to settle
systemOutput( "Running #type# [#numberFormat( runs )#] times, inspect: [#inspect#]", true );
s = getTickCount();
ArrayEach( arr, function( item, idx, _arr ){
var start = getTickCount();
_internalRequest(
template: template
);
arguments.item = getTickCount() - start;
arguments._arr[ arguments.idx ] = getTickCount() - start;
}, true );
} catch ( e ){
systemOutput( e, true );
Expand Down

0 comments on commit 61ccc06

Please sign in to comment.