Skip to content

Commit

Permalink
Merge pull request #2595 from grumbach/local_as_runtime_opt
Browse files Browse the repository at this point in the history
WIP: local as runtime opt
  • Loading branch information
grumbach authored Jan 14, 2025
2 parents eec5cb7 + fa5b005 commit d2313da
Show file tree
Hide file tree
Showing 48 changed files with 586 additions and 606 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/benchmark-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ 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 ant
run: cargo build --release --bin antnode --bin ant
timeout-minutes: 30

- name: Start a local network
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:

- name: Start a client instance to compare memory usage
shell: bash
run: ./target/release/ant --log-output-dest=data-dir file upload "./the-test-data.zip"
run: ./target/release/ant --log-output-dest=data-dir --local file upload "./the-test-data.zip"
env:
ANT_LOG: "all"
timeout-minutes: 5
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
# # Criterion outputs the actual bench results to stderr "2>&1 tee output.txt" takes stderr,
# # passes to tee which displays it in the terminal and writes to output.txt
# run: |
# cargo criterion --features=local --message-format=json 2>&1 -p sn_cli | tee -a output.txt
# cargo criterion --message-format=json 2>&1 -p sn_cli | tee -a output.txt
# cat output.txt | rg benchmark-complete | jq -s 'map({
# name: (.id | split("/"))[-1],
# unit: "MiB/s",
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 ant
run: cargo build --release --bin antnode --bin ant
timeout-minutes: 30

- name: Start a local network
Expand All @@ -67,7 +67,7 @@ jobs:
# Criterion outputs the actual bench results to stderr "2>&1 tee output.txt" takes stderr,
# passes to tee which displays it in the terminal and writes to output.txt
run: |
cargo criterion --features=local --message-format=json 2>&1 -p autonomi-cli | tee -a output.txt
cargo criterion --message-format=json 2>&1 -p ant | tee -a output.txt
cat output.txt | rg benchmark-complete | jq -s 'map({
name: (.id | split("/"))[-1],
unit: "MiB/s",
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:

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

Expand Down
8 changes: 4 additions & 4 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 ant
run: cargo build --release --bin antnode --bin ant
timeout-minutes: 30

- name: Start a local network
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
shell: bash

- name: File upload
run: ./target/release/ant --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 --local file upload --public "./the-test-data.zip" > ./upload_output 2>&1
env:
ANT_LOG: "v"
timeout-minutes: 15
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
ls -l $ANT_DATA_PATH/client_first/logs
mkdir $ANT_DATA_PATH/client
ls -l $ANT_DATA_PATH
./target/release/ant --log-output-dest=data-dir file upload --public "./the-test-data.zip" > ./upload_output_second 2>&1
./target/release/ant --log-output-dest=data-dir --local file upload --public "./the-test-data.zip" > ./upload_output_second 2>&1
rg 'All chunks already exist on the network.' ./upload_output_second -c --stats
env:
ANT_LOG: "all"
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
if: always()

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

0 comments on commit d2313da

Please sign in to comment.