Skip to content

Commit

Permalink
test(CI): confirm not open too many FDs
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi committed Jan 14, 2025
1 parent 973496a commit 02a66cf
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ jobs:
ls -l $ANT_DATA_PATH/client_first/logs
mkdir $ANT_DATA_PATH/client
ls -l $ANT_DATA_PATH
<<<<<<< HEAD
./target/release/ant --log-output-dest=data-dir file upload --public "./the-test-data.zip" > ./upload_output_second 2>&1
rg 'Total cost: 0 AttoTokens' ./upload_output_second -c --stats
=======
cp ./the-test-data.zip ./the-test-data_1.zip
./target/release/ant --log-output-dest data-dir file upload "the-test-data_1.zip" > ./second_upload 2>&1
>>>>>>> 5b66cf422... test(CI): confirm not open too many FDs
env:
ANT_LOG: "all"
timeout-minutes: 25
Expand Down Expand Up @@ -164,6 +169,23 @@ jobs:
run: pgrep antnode | wc -l
if: always()

- name: confirm opened FDs
shell: bash
timeout-minutes: 1
continue-on-error: true
run: |
fd_cap="30"
pids=$(pgrep antnode)
for pid in $pids; do
fd_count=$(ls /proc/$pid/fd | wc -l)
echo "Process $pid - File Descriptors: $fd_count"
if (( $(echo "$fd_count > $fd_cap" | bc -l) )); then
echo "Process $pid holding FD exceeded threshold: $fd_cap"
exit 1
fi
done
if: always()

- name: Stop the local network and upload logs
if: always()
uses: maidsafe/ant-local-testnet-action@main
Expand Down

0 comments on commit 02a66cf

Please sign in to comment.