More precise startup benchmark
This commit is contained in:
parent
4ce5f50cd3
commit
0c5639f4f3
|
@ -90,15 +90,15 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
npm run clean:server:test
|
npm run clean:server:test
|
||||||
|
|
||||||
startCold=`date +%s`
|
startCold=`date +%s%3N`
|
||||||
NODE_APP_INSTANCE=1 NODE_ENV=test node dist/server --benchmark-startup
|
NODE_APP_INSTANCE=1 NODE_ENV=test node dist/server --benchmark-startup
|
||||||
endCold=`date +%s`
|
endCold=`date +%s%3N`
|
||||||
coldStartupTime=$((endCold-startCold))
|
coldStartupTime=$(echo "scale=2; ($endCold-$startCold)/1000" | bc)
|
||||||
|
|
||||||
startHot=`date +%s`
|
startHot=`date +%s%3N`
|
||||||
NODE_APP_INSTANCE=1 NODE_ENV=test node dist/server --benchmark-startup
|
NODE_APP_INSTANCE=1 NODE_ENV=test node dist/server --benchmark-startup
|
||||||
endHot=`date +%s`
|
endHot=`date +%s%3N`
|
||||||
hotStartupTime=$((endHot-startHot))
|
hotStartupTime=$(echo "scale=2; ($endHot-$startHot)/1000" | bc)
|
||||||
|
|
||||||
echo '{"coldStartupTime":'$coldStartupTime',"hotStartupTime":'$hotStartupTime'}'> startup-time.json
|
echo '{"coldStartupTime":'$coldStartupTime',"hotStartupTime":'$hotStartupTime'}'> startup-time.json
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue