Skip to content

Commit

Permalink
CLI - Fix helptext after #1845 (#1889)
Browse files Browse the repository at this point in the history
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
  • Loading branch information
bfops and bfops authored Oct 23, 2024
1 parent 83fc5c3 commit c667c51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions crates/cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Or initialize a default identity with:
format!(
"Cannot verify tokens using invalid saved fingerprint from server: {server}
Update the fingerprint with:
\tspacetime server fingerprint -s {server}",
\tspacetime server fingerprint {server}",
)
})?;
decode_token(&decoder, &id.token).map_err(|_| {
Expand Down Expand Up @@ -120,13 +120,13 @@ const NO_DEFAULT_SERVER_ERROR_MESSAGE: &str = "No default server configuration.
Set an existing server as the default with:
\tspacetime server set-default <server>
Or add a new server which will become the default:
\tspacetime server add <url> --default";
\tspacetime server add {server} <url> --default";

fn no_such_server_error(server: &str) -> anyhow::Error {
anyhow::anyhow!(
"No such saved server configuration: {server}
Add a new server configuration with:
\tspacetime server add <url>",
\tspacetime server add {server} --url <url>",
)
}

Expand Down Expand Up @@ -973,7 +973,7 @@ Import an existing identity with:
format!(
"Unable to parse invalid saved server fingerprint as ECDSA public key.
Update the server's fingerprint with:
\tspacetime server fingerprint -s {}",
\tspacetime server fingerprint {}",
server.unwrap_or("")
)
})
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/subcommands/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ async fn exec_list(config: Config, args: &ArgMatches) -> Result<(), anyhow::Erro
format!(
"Cannot list identities for server without a saved fingerprint: {server_name}
Fetch the server's fingerprint with:
\tspacetime server fingerprint -s {server_name}"
\tspacetime server fingerprint {server_name}"
)
})?;
let default_identity = config.get_default_identity_config(server).ok().map(|cfg| cfg.identity);
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/subcommands/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ pub async fn exec_add(mut config: Config, args: &ArgMatches) -> Result<(), anyho
"Unable to retrieve fingerprint for server: {url}
Is the server running?
Add a server without retrieving its fingerprint with:
\tspacetime server add {url} --no-fingerprint",
\tspacetime server add --url {url} --no-fingerprint",
)
})?;
println!("For server {}, got fingerprint:\n{}", url, fingerprint);
Expand Down

2 comments on commit c667c51

@github-actions
Copy link

@github-actions github-actions bot commented on c667c51 Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmarking failed. Please check the workflow run for details.

@github-actions
Copy link

@github-actions github-actions bot commented on c667c51 Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Callgrind benchmark results

Callgrind Benchmark Report

These benchmarks were run using callgrind,
an instruction-level profiler. They allow comparisons between sqlite (sqlite), SpacetimeDB running through a module (stdb_module), and the underlying SpacetimeDB data storage engine (stdb_raw). Callgrind emulates a CPU to collect the below estimates.

Measurement changes larger than five percent are in bold.

In-memory benchmarks

callgrind: empty transaction

db total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw 6514 6514 0.00% 6548 6548 0.00%
sqlite 5579 5579 0.00% 5971 5971 0.00%

callgrind: filter

db schema indices count preload _column data_type total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str no_index 64 128 1 u64 76680 76680 0.00% 77054 77050 0.01%
stdb_raw u32_u64_str no_index 64 128 2 string 118922 118922 0.00% 119382 119406 -0.02%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25230 25232 -0.01% 25674 25676 -0.01%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24197 24197 0.00% 24527 24527 0.00%
sqlite u32_u64_str no_index 64 128 2 string 144695 144695 0.00% 146107 146107 0.00%
sqlite u32_u64_str no_index 64 128 1 u64 124044 124044 0.00% 125126 125126 0.00%
sqlite u32_u64_str btree_each_column 64 128 1 u64 131361 131361 0.00% 132691 132691 0.00%
sqlite u32_u64_str btree_each_column 64 128 2 string 134500 134494 0.00% 136048 136038 0.01%

callgrind: insert bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 64 128 904379 903926 0.05% 925621 956316 -3.21%
stdb_raw u32_u64_str btree_each_column 64 128 1055052 1056047 -0.09% 1094244 1126773 -2.89%
sqlite u32_u64_str unique_0 64 128 398320 398320 0.00% 416968 416972 -0.00%
sqlite u32_u64_str btree_each_column 64 128 983643 983637 0.00% 1022369 1022363 0.00%

callgrind: iterate

db schema indices count total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 153906 153906 0.00% 153944 153944 0.00%
stdb_raw u32_u64_str unique_0 64 16931 16931 0.00% 16969 16969 0.00%
sqlite u32_u64_str unique_0 1024 1067255 1067255 0.00% 1070643 1070643 0.00%
sqlite u32_u64_str unique_0 64 76201 76201 0.00% 77247 77247 0.00%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 json 47528 47528 0.00% 50252 50252 0.00%
64 bsatn 25509 25509 0.00% 27685 27685 0.00%
16 bsatn 8200 8200 0.00% 9492 9492 0.00%
16 json 12188 12188 0.00% 14160 14160 0.00%

callgrind: update bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 1024 20775365 21208844 -2.04% 21448991 21908516 -2.10%
stdb_raw u32_u64_str unique_0 64 128 1317074 1316935 0.01% 1364226 1364043 0.01%
sqlite u32_u64_str unique_0 1024 1024 1802128 1802128 0.00% 1811394 1811398 -0.00%
sqlite u32_u64_str unique_0 64 128 128474 128474 0.00% 131252 131252 0.00%
On-disk benchmarks

callgrind: empty transaction

db total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw 6519 6519 0.00% 6553 6553 0.00%
sqlite 5621 5621 0.00% 6081 6081 0.00%

callgrind: filter

db schema indices count preload _column data_type total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str no_index 64 128 1 u64 76685 76685 0.00% 77059 77059 0.00%
stdb_raw u32_u64_str no_index 64 128 2 string 118927 118927 0.00% 119379 119467 -0.07%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25234 25235 -0.00% 25670 25647 0.09%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24202 24202 0.00% 24528 24528 0.00%
sqlite u32_u64_str no_index 64 128 1 u64 125965 125965 0.00% 127391 127391 0.00%
sqlite u32_u64_str no_index 64 128 2 string 146616 146616 0.00% 148376 148372 0.00%
sqlite u32_u64_str btree_each_column 64 128 2 string 136616 136616 0.00% 138566 138566 0.00%
sqlite u32_u64_str btree_each_column 64 128 1 u64 133457 133457 0.00% 135259 135259 0.00%

callgrind: insert bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 64 128 853067 853540 -0.06% 903917 904488 -0.06%
stdb_raw u32_u64_str btree_each_column 64 128 1004469 1005759 -0.13% 1073191 1074569 -0.13%
sqlite u32_u64_str unique_0 64 128 415857 415857 0.00% 433907 433903 0.00%
sqlite u32_u64_str btree_each_column 64 128 1021904 1021898 0.00% 1059952 1059954 -0.00%

callgrind: iterate

db schema indices count total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 153911 153911 0.00% 153949 153949 0.00%
stdb_raw u32_u64_str unique_0 64 16936 16936 0.00% 16974 16974 0.00%
sqlite u32_u64_str unique_0 1024 1070323 1070323 0.00% 1074173 1074173 0.00%
sqlite u32_u64_str unique_0 64 77973 77973 0.00% 79279 79279 0.00%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 json 47528 47528 0.00% 50252 50252 0.00%
64 bsatn 25509 25509 0.00% 27685 27685 0.00%
16 bsatn 8200 8200 0.00% 9492 9492 0.00%
16 json 12188 12188 0.00% 14160 14160 0.00%

callgrind: update bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 1024 19516713 19512358 0.02% 20251017 20246478 0.02%
stdb_raw u32_u64_str unique_0 64 128 1269642 1269770 -0.01% 1346178 1346246 -0.01%
sqlite u32_u64_str unique_0 1024 1024 1809689 1809689 0.00% 1818261 1818261 0.00%
sqlite u32_u64_str unique_0 64 128 132618 132618 0.00% 135476 135476 0.00%

Please sign in to comment.