Skip to content

Commit

Permalink
Merge pull request #2475 from jacderida/chore-rename_autonomi_cli3
Browse files Browse the repository at this point in the history
chore: rename `autonomi-cli` crate and binary
  • Loading branch information
jacderida authored Dec 2, 2024
2 parents 60913ec + 73e421f commit 5861576
Show file tree
Hide file tree
Showing 48 changed files with 336 additions and 331 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/benchmark-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ jobs:
# it will be better to execute bench test with `local`,
# to make the measurement results reflect speed improvement or regression more accurately.
- name: Build binaries
run: cargo build --release --features local --bin antnode --bin autonomi
run: cargo build --release --features local --bin antnode --bin ant
timeout-minutes: 30

- name: Start a local network
uses: maidsafe/ant-local-testnet-action@main
env:
SN_LOG: "all"
ANT_LOG: "all"
with:
action: start
enable-evm-testnet: true
node-path: target/release/antnode
platform: ubuntu-latest
build: true

- name: Check SAFE_PEERS was set
- name: Check ANT_PEERS was set
shell: bash
run: echo "The SAFE_PEERS variable has been set to $SAFE_PEERS"
run: echo "The ANT_PEERS variable has been set to $ANT_PEERS"

- name: export default secret key
run: echo "SECRET_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" >> $GITHUB_ENV
Expand All @@ -71,9 +71,9 @@ jobs:

- name: Start a client instance to compare memory usage
shell: bash
run: ./target/release/autonomi --log-output-dest=data-dir file upload "./the-test-data.zip"
run: ./target/release/ant --log-output-dest=data-dir file upload "./the-test-data.zip"
env:
SN_LOG: "all"
ANT_LOG: "all"
timeout-minutes: 5

- name: Cleanup uploaded_files folder to avoid pollute download benchmark
Expand All @@ -93,7 +93,7 @@ jobs:
client_avg_mem_limit_mb="512" # mb
peak_mem_usage=$(
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob autonomi.* -o --no-line-number --no-filename |
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob ant.* -o --no-line-number --no-filename |
awk -F':' '/"memory_used_mb":/{print $2}' |
sort -n |
tail -n 1
Expand All @@ -105,11 +105,11 @@ jobs:
fi
total_mem=$(
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob autonomi.* -o --no-line-number --no-filename |
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob ant.* -o --no-line-number --no-filename |
awk -F':' '/"memory_used_mb":/ {sum += $2} END {printf "%.0f\n", sum}'
)
num_of_times=$(
rg "\"memory_used_mb\"" $CLIENT_DATA_PATH/logs --glob autonomi.* -c --stats |
rg "\"memory_used_mb\"" $CLIENT_DATA_PATH/logs --glob ant.* -c --stats |
rg "(\d+) matches" |
rg "\d+" -o
)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/generate-benchmark-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: wget https://sn-node.s3.eu-west-2.amazonaws.com/the-test-data.zip

- name: Build node and cli binaries
run: cargo build --release --features local --bin antnode --bin autonomi
run: cargo build --release --features local --bin antnode --bin ant
timeout-minutes: 30

- name: Start a local network
Expand Down Expand Up @@ -100,9 +100,9 @@ jobs:

- name: Start a client instance to compare memory usage
shell: bash
run: cargo run --bin autonomi --release -- --log-output-dest=data-dir file upload the-test-data.zip
run: cargo run --bin ant --release -- --log-output-dest data-dir file upload the-test-data.zip
env:
SN_LOG: "all"
ANT_LOG: "all"

#########################
### Stop Network ###
Expand Down
39 changes: 22 additions & 17 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: sudo apt-get install -y ripgrep

- name: Build binaries
run: cargo build --release --features local --bin antnode --bin autonomi
run: cargo build --release --features local --bin antnode --bin ant
timeout-minutes: 30

- name: Start a local network
Expand All @@ -48,9 +48,9 @@ jobs:
platform: ubuntu-latest
build: true

- name: Check SAFE_PEERS was set
- name: Check ANT_PEERS was set
shell: bash
run: echo "The SAFE_PEERS variable has been set to $SAFE_PEERS"
run: echo "The ANT_PEERS variable has been set to $ANT_PEERS"

- name: Start a node instance to be restarted
run: |
Expand All @@ -59,7 +59,7 @@ jobs:
--root-dir $RESTART_TEST_NODE_DATA_PATH --log-output-dest $RESTART_TEST_NODE_DATA_PATH --local --rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" &
sleep 10
env:
SN_LOG: "all"
ANT_LOG: "all"

- name: Download 95mb file to be uploaded with the safe client
shell: bash
Expand All @@ -70,9 +70,9 @@ jobs:
shell: bash

- name: File upload
run: ./target/release/autonomi --log-output-dest=data-dir file upload --public "./the-test-data.zip" > ./upload_output 2>&1
run: ./target/release/ant --log-output-dest=data-dir file upload --public "./the-test-data.zip" > ./upload_output 2>&1
env:
SN_LOG: "v"
ANT_LOG: "v"
timeout-minutes: 5

- name: showing the upload terminal output
Expand All @@ -99,9 +99,9 @@ jobs:
mkdir $ANT_DATA_PATH/client
ls -l $ANT_DATA_PATH
cp ./the-test-data.zip ./the-test-data_1.zip
./target/release/autonomi --log-output-dest=data-dir file upload "./the-test-data_1.zip" > ./second_upload 2>&1
env:
SN_LOG: "all"
./target/release/ant --log-output-dest data-dir file_TYPE upload "" > ./second_upload 2>&1
enrelease-candidatev:
ANT_LOG: "all"
timeout-minutes: 25

- name: showing the second upload terminal output
Expand All @@ -110,15 +110,18 @@ jobs:
if: always()

- name: Stop the restart node
run: kill $( cat $RESTART_TEST_NODE_DATA_PATH/antnode.pid )
run: kill $(cat $RESTART_TEST_NODE_DATA_PATH/antnode.pid)

- name: Start the restart node again
run: |
./target/release/antnode \
--root-dir $RESTART_TEST_NODE_DATA_PATH --log-output-dest $RESTART_TEST_NODE_DATA_PATH --local --rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" &
--root-dir-type PARESTART_TEST_NODE_DATA_PATH \
--log-output-dest $RESTART_TEST_NODE_DATA_PATH \
--local \
--rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" &
sleep 10
env:
SN_LOG: "all"
ANT_LOG: "all"

# Records are encrypted, and seeds will change after restart
# Currently, there will be `Existing record found`, but NO `Existing record loaded`
Expand Down Expand Up @@ -147,9 +150,11 @@ jobs:
if: always()

- name: File Download
run: ./target/release/autonomi --log-output-dest=data-dir file download ${{ env.UPLOAD_ADDRESS }} ./downloaded_resources
run: >
./target/release/ant
--log-output-dest=data-dir file download ${{ env.UPLOAD_ADDRESS }} ./downloaded_resources
env:
SN_LOG: "v"
ANT_LOG: "v"
timeout-minutes: 2

- name: Check nodes running
Expand Down Expand Up @@ -203,7 +208,7 @@ jobs:
client_avg_mem_limit_mb="512" # mb
peak_mem_usage=$(
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob autonomi.* -o --no-line-number --no-filename |
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob ant.* -o --no-line-number --no-filename |
awk -F':' '/"memory_used_mb":/{print $2}' |
sort -n |
tail -n 1
Expand All @@ -215,11 +220,11 @@ jobs:
fi
total_mem=$(
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob autonomi.* -o --no-line-number --no-filename |
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob ant.* -o --no-line-number --no-filename |
awk -F':' '/"memory_used_mb":/ {sum += $2} END {printf "%.0f\n", sum}'
)
num_of_times=$(
rg "\"memory_used_mb\"" $CLIENT_DATA_PATH/logs --glob autonomi.* -c --stats |
rg "\"memory_used_mb\"" $CLIENT_DATA_PATH/logs --glob ant.* -c --stats |
rg "(\d+) matches" |
rg "\d+" -o
)
Expand Down
Loading

0 comments on commit 5861576

Please sign in to comment.