Skip to content

Commit

Permalink
fix: use the correct client cli name and paths
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin committed Oct 16, 2024
1 parent b5b2efa commit a1a7cc8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/generate-benchmark-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 | tee -a output.txt
cargo criterion --features=local --message-format=json 2>&1 -p autonomi-cli | tee -a output.txt
cat output.txt | rg benchmark-complete | jq -s 'map({
name: (.id | split("/"))[-1],
unit: "MiB/s",
Expand Down Expand Up @@ -158,17 +158,17 @@ jobs:
shell: bash
run: |
peak_mem_usage=$(
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob safe.* -o --no-line-number --no-filename |
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs/*/*.log -o --no-line-number --no-filename |
awk -F':' '/"memory_used_mb":/{print $2}' |
sort -n |
tail -n 1
)
total_mem=$(
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob safe.* -o --no-line-number --no-filename |
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs/*/*.log -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 safe.* -c --stats |
rg "\"memory_used_mb\"" $CLIENT_DATA_PATH/logs/*/*.log -c --stats |
rg "(\d+) matches" |
rg "\d+" -o
)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Libp2p.<br>

### For Users

- [CLI](https://github.com/maidsafe/safe_network/blob/main/autonomi_cli/README.md) The Command Line
- [CLI](https://github.com/maidsafe/safe_network/blob/main/autonomi-cli/README.md) The Command Line
Interface, allowing users to interact with the network from their terminal.
- [Node](https://github.com/maidsafe//safe_network/blob/main/sn_node/README.md) The backbone of the
safe network. Nodes can be run on commodity hardware and provide storage space and validation of
Expand Down Expand Up @@ -65,7 +65,7 @@ cargo build --release --features=network-contacts --bin safenode

- [Autonomi API](https://github.com/maidsafe/safe_network/blob/main/autonomi/README.md) The client APIs
allowing use of the Autonomi Network to users and developers.
- [Autonomi CLI](https://github.com/maidsafe/safe_network/blob/main/autonomi_cli/README.md) The Command Line
- [Autonomi CLI](https://github.com/maidsafe/safe_network/blob/main/autonomi-cli/README.md) The Command Line
Interface, allowing users to interact with the network from their terminal.
- [Node](https://github.com/maidsafe/safe_network/blob/main/sn_node/README.md) The backbone of the
autonomi network. Nodes can be run on commodity hardware and run the Network.
Expand Down
2 changes: 1 addition & 1 deletion autonomi-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A CLI for the Autonomi Network

```
Usage: autonomi_cli [OPTIONS] <COMMAND>
Usage: autonomi [OPTIONS] <COMMAND>
Commands:
file Operations related to file handling
Expand Down
2 changes: 1 addition & 1 deletion autonomi-cli/benches/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fn get_cli_path() -> PathBuf {
path.push("target");
}
path.push("release");
path.push("autonomi_cli");
path.push("autonomi");
path
}

Expand Down
2 changes: 1 addition & 1 deletion autonomi-cli/src/access/data_dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn get_client_data_dir_path() -> Result<PathBuf> {
let mut home_dirs = dirs_next::data_dir()
.ok_or_else(|| eyre!("Failed to obtain data dir, your OS might not be supported."))?;
home_dirs.push("safe");
home_dirs.push("client");
home_dirs.push("autonomi");
std::fs::create_dir_all(home_dirs.as_path()).wrap_err("Failed to create data dir")?;
Ok(home_dirs)
}
6 changes: 1 addition & 5 deletions sn_logging/src/layers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,21 +266,17 @@ fn get_logging_targets(logging_env_value: &str) -> Result<Vec<(String, Level)>>
if contains_keyword_all_sn_logs || contains_keyword_verbose_sn_logs {
let mut t = BTreeMap::from_iter(vec![
// bins
("autonomi_cli".to_string(), Level::TRACE),
("autonomi-cli".to_string(), Level::TRACE),
("evm_testnet".to_string(), Level::TRACE),
("faucet".to_string(), Level::TRACE),
("safenode".to_string(), Level::TRACE),
("safenode_rpc_client".to_string(), Level::TRACE),
("safe".to_string(), Level::TRACE),
("safenode_manager".to_string(), Level::TRACE),
("safenodemand".to_string(), Level::TRACE),
// libs
("autonomi".to_string(), Level::TRACE),
("evmlib".to_string(), Level::TRACE),
("sn_evm".to_string(), Level::TRACE),
("sn_build_info".to_string(), Level::TRACE),
("sn_client".to_string(), Level::TRACE),
("sn_faucet".to_string(), Level::TRACE),
("sn_logging".to_string(), Level::TRACE),
("sn_node_manager".to_string(), Level::TRACE),
("sn_node_rpc_client".to_string(), Level::TRACE),
Expand Down

0 comments on commit a1a7cc8

Please sign in to comment.