Skip to content

Commit

Permalink
CLI - spacetime upgrade takes --yes instead of deprecated `--forc…
Browse files Browse the repository at this point in the history
…e` (#1805)

Co-authored-by: Zeke Foppa <[email protected]>
  • Loading branch information
bfops and bfops authored Oct 5, 2024
1 parent 02b70d5 commit 126dcae
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions crates/cli/src/subcommands/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{env, fs};
extern crate regex;

use crate::util::y_or_n;
use crate::{version, Config};
use crate::{common_args, version, Config};
use clap::{Arg, ArgMatches};
use flate2::read::GzDecoder;
use futures::stream::StreamExt;
Expand All @@ -19,13 +19,7 @@ pub fn cli() -> clap::Command {
clap::Command::new("upgrade")
.about("Checks for updates for the currently running spacetime CLI tool")
.arg(Arg::new("version").help("The specific version to upgrade to"))
.arg(
Arg::new("force")
.short('f')
.long("force")
.help("If this flag is present, the upgrade will be performed even if the version is the same")
.action(clap::ArgAction::SetTrue),
)
.arg(common_args::yes())
.after_help("Run `spacetime help upgrade` for more detailed information.\n")
}

Expand Down

2 comments on commit 126dcae

@github-actions
Copy link

@github-actions github-actions bot commented on 126dcae Oct 5, 2024

Choose a reason for hiding this comment

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

Criterion benchmark results

Criterion benchmark report

YOU SHOULD PROBABLY IGNORE THESE RESULTS.

Criterion is a wall time based benchmarking system that is extremely noisy when run on CI. We collect these results for longitudinal analysis, but they are not reliable for comparing individual PRs.

Go look at the callgrind report instead.

empty

db on disk new latency old latency new throughput old throughput
sqlite 💿 410.9±1.92ns 404.3±1.22ns - -
sqlite 🧠 406.7±1.80ns 406.3±3.61ns - -
stdb_raw 💿 621.5±0.84ns 638.1±1.38ns - -
stdb_raw 🧠 624.0±3.21ns 638.5±1.51ns - -

insert_1

db on disk schema indices preload new latency old latency new throughput old throughput

insert_bulk

db on disk schema indices preload count new latency old latency new throughput old throughput
sqlite 💿 u32_u64_str btree_each_column 2048 256 583.5±1.40µs 587.9±0.59µs 1713 tx/sec 1701 tx/sec
sqlite 💿 u32_u64_str unique_0 2048 256 147.1±0.46µs 153.7±0.33µs 6.6 Ktx/sec 6.4 Ktx/sec
sqlite 💿 u32_u64_u64 btree_each_column 2048 256 471.7±13.25µs 467.3±0.89µs 2.1 Ktx/sec 2.1 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 2048 256 142.0±21.79µs 138.3±0.37µs 6.9 Ktx/sec 7.1 Ktx/sec
sqlite 🧠 u32_u64_str btree_each_column 2048 256 446.3±0.36µs 450.8±0.39µs 2.2 Ktx/sec 2.2 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 2048 256 121.9±0.46µs 124.8±0.43µs 8.0 Ktx/sec 7.8 Ktx/sec
sqlite 🧠 u32_u64_u64 btree_each_column 2048 256 366.3±0.76µs 369.0±0.82µs 2.7 Ktx/sec 2.6 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 2048 256 104.5±0.43µs 105.7±0.44µs 9.3 Ktx/sec 9.2 Ktx/sec
stdb_raw 💿 u32_u64_str btree_each_column 2048 256 588.8±17.57µs 581.2±19.41µs 1698 tx/sec 1720 tx/sec
stdb_raw 💿 u32_u64_str unique_0 2048 256 481.5±39.34µs 473.2±41.06µs 2.0 Ktx/sec 2.1 Ktx/sec
stdb_raw 💿 u32_u64_u64 btree_each_column 2048 256 379.4±5.50µs 384.6±6.71µs 2.6 Ktx/sec 2.5 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 2048 256 345.7±12.43µs 357.8±8.14µs 2.8 Ktx/sec 2.7 Ktx/sec
stdb_raw 🧠 u32_u64_str btree_each_column 2048 256 306.8±0.23µs 307.6±0.36µs 3.2 Ktx/sec 3.2 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 2048 256 236.5±0.57µs 241.8±0.24µs 4.1 Ktx/sec 4.0 Ktx/sec
stdb_raw 🧠 u32_u64_u64 btree_each_column 2048 256 243.8±0.07µs 251.4±0.14µs 4.0 Ktx/sec 3.9 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 2048 256 216.4±0.16µs 220.6±0.24µs 4.5 Ktx/sec 4.4 Ktx/sec

iterate

db on disk schema indices new latency old latency new throughput old throughput
sqlite 💿 u32_u64_str unique_0 23.1±0.11µs 22.6±0.32µs 42.2 Ktx/sec 43.1 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 20.6±0.06µs 20.7±0.32µs 47.4 Ktx/sec 47.2 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 19.5±0.10µs 19.9±0.15µs 50.2 Ktx/sec 49.0 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 17.9±0.16µs 18.0±0.23µs 54.5 Ktx/sec 54.4 Ktx/sec
stdb_raw 💿 u32_u64_str unique_0 4.0±0.00µs 4.8±0.00µs 246.0 Ktx/sec 202.7 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 3.9±0.00µs 4.7±0.00µs 252.0 Ktx/sec 206.7 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 4.0±0.00µs 4.8±0.00µs 245.3 Ktx/sec 202.1 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 3.9±0.00µs 4.7±0.00µs 251.8 Ktx/sec 206.7 Ktx/sec

find_unique

db on disk key type preload new latency old latency new throughput old throughput

filter

db on disk key type index strategy load count new latency old latency new throughput old throughput
sqlite 💿 string index 2048 256 68.1±0.20µs 69.6±0.23µs 14.4 Ktx/sec 14.0 Ktx/sec
sqlite 💿 u64 index 2048 256 64.9±0.33µs 65.8±0.10µs 15.0 Ktx/sec 14.8 Ktx/sec
sqlite 🧠 string index 2048 256 64.2±0.24µs 65.9±0.11µs 15.2 Ktx/sec 14.8 Ktx/sec
sqlite 🧠 u64 index 2048 256 58.6±0.14µs 59.9±0.17µs 16.7 Ktx/sec 16.3 Ktx/sec
stdb_raw 💿 string index 2048 256 4.9±0.00µs 4.9±0.00µs 198.9 Ktx/sec 200.5 Ktx/sec
stdb_raw 💿 u64 index 2048 256 4.8±0.00µs 4.8±0.00µs 204.3 Ktx/sec 201.7 Ktx/sec
stdb_raw 🧠 string index 2048 256 4.9±0.00µs 4.9±0.00µs 198.5 Ktx/sec 200.3 Ktx/sec
stdb_raw 🧠 u64 index 2048 256 4.8±0.00µs 4.8±0.00µs 204.3 Ktx/sec 201.8 Ktx/sec

serialize

schema format count new latency old latency new throughput old throughput
u32_u64_str bflatn_to_bsatn_fast_path 100 3.3±0.01µs 3.3±0.00µs 29.3 Mtx/sec 29.3 Mtx/sec
u32_u64_str bflatn_to_bsatn_slow_path 100 3.0±0.01µs 3.0±0.01µs 31.8 Mtx/sec 31.3 Mtx/sec
u32_u64_str bsatn 100 2.5±0.01µs 2.4±0.00µs 37.8 Mtx/sec 40.5 Mtx/sec
u32_u64_str bsatn 100 40.5±0.10ns 40.5±0.67ns 2.3 Gtx/sec 2.3 Gtx/sec
u32_u64_str json 100 5.7±0.16µs 5.7±0.02µs 16.7 Mtx/sec 16.8 Mtx/sec
u32_u64_str json 100 7.9±0.01µs 7.1±0.02µs 12.1 Mtx/sec 13.5 Mtx/sec
u32_u64_str product_value 100 1017.2±0.57ns 1017.5±0.47ns 93.8 Mtx/sec 93.7 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_fast_path 100 1129.2±3.91ns 1160.5±1.25ns 84.5 Mtx/sec 82.2 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_slow_path 100 2.4±0.00µs 2.5±0.00µs 39.0 Mtx/sec 38.9 Mtx/sec
u32_u64_u64 bsatn 100 1706.0±39.52ns 1668.2±31.71ns 55.9 Mtx/sec 57.2 Mtx/sec
u32_u64_u64 bsatn 100 29.1±0.22ns 39.4±0.09ns 3.2 Gtx/sec 2.4 Gtx/sec
u32_u64_u64 json 100 3.2±0.05µs 3.4±0.06µs 29.5 Mtx/sec 28.3 Mtx/sec
u32_u64_u64 json 100 4.9±0.22µs 4.9±0.16µs 19.5 Mtx/sec 19.3 Mtx/sec
u32_u64_u64 product_value 100 1014.4±1.35ns 1014.6±1.53ns 94.0 Mtx/sec 94.0 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_fast_path 100 900.7±2.38ns 922.4±1.27ns 105.9 Mtx/sec 103.4 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_slow_path 100 2.5±0.00µs 2.5±0.00µs 38.9 Mtx/sec 38.8 Mtx/sec
u64_u64_u32 bsatn 100 1678.2±29.98ns 1697.6±36.77ns 56.8 Mtx/sec 56.2 Mtx/sec
u64_u64_u32 bsatn 100 750.1±0.55ns 707.3±0.42ns 127.1 Mtx/sec 134.8 Mtx/sec
u64_u64_u32 json 100 3.5±0.01µs 3.6±0.04µs 27.0 Mtx/sec 26.2 Mtx/sec
u64_u64_u32 json 100 4.7±0.02µs 5.0±0.01µs 20.1 Mtx/sec 19.3 Mtx/sec
u64_u64_u32 product_value 100 1017.9±7.50ns 1015.7±1.15ns 93.7 Mtx/sec 93.9 Mtx/sec

stdb_module_large_arguments

arg size new latency old latency new throughput old throughput
64KiB 107.2±9.69µs 104.0±7.68µs - -

stdb_module_print_bulk

line count new latency old latency new throughput old throughput
1 55.2±6.63µs 51.0±7.13µs - -
100 600.3±5.09µs 592.0±6.56µs - -
1000 3.4±0.19ms 3.7±0.70ms - -

remaining

name new latency old latency new throughput old throughput
special/db_game/circles/load=10 313.4±3.25µs 295.0±5.49µs - -
special/db_game/circles/load=100 313.5±4.55µs 294.1±4.65µs - -
special/db_game/ia_loop/load=10 0.0±0.00ns 0.0±0.00ns - -
special/db_game/ia_loop/load=100 0.0±0.00ns 0.0±0.00ns - -
sqlite/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 55.7±0.49µs 53.2±0.23µs 17.5 Ktx/sec 18.3 Ktx/sec
sqlite/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 48.0±0.27µs 45.6±0.11µs 20.4 Ktx/sec 21.4 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 40.7±0.27µs 37.8±0.17µs 24.0 Ktx/sec 25.9 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 36.5±0.23µs 34.4±0.24µs 26.8 Ktx/sec 28.4 Ktx/sec
stdb_module/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 1294.9±17.95µs 1288.0±12.68µs 772 tx/sec 776 tx/sec
stdb_module/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 1043.0±5.85µs 1029.5±31.75µs 958 tx/sec 971 tx/sec
stdb_raw/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 638.6±16.04µs 550.7±17.58µs 1565 tx/sec 1815 tx/sec
stdb_raw/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 491.9±7.60µs 494.4±7.63µs 2032 tx/sec 2022 tx/sec
stdb_raw/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 372.1±0.70µs 375.3±0.41µs 2.6 Ktx/sec 2.6 Ktx/sec
stdb_raw/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 336.7±0.46µs 346.8±0.50µs 2.9 Ktx/sec 2.8 Ktx/sec

@github-actions
Copy link

@github-actions github-actions bot commented on 126dcae Oct 5, 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 5395 5395 0.00% 5441 5441 0.00%
sqlite 5509 5509 0.00% 5973 5973 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 2 string 117904 117904 0.00% 118548 118568 -0.02%
stdb_raw u32_u64_str no_index 64 128 1 u64 75493 75493 0.00% 75929 75929 0.00%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 24052 24051 0.00% 24504 24499 0.02%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 23019 23019 0.00% 23495 23523 -0.12%
sqlite u32_u64_str no_index 64 128 2 string 144677 144677 0.00% 146227 146219 0.01%
sqlite u32_u64_str no_index 64 128 1 u64 124027 124027 0.00% 125385 125389 -0.00%
sqlite u32_u64_str btree_each_column 64 128 2 string 134476 134476 0.00% 136210 136218 -0.01%
sqlite u32_u64_str btree_each_column 64 128 1 u64 131344 131344 0.00% 132838 132842 -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 894004 895743 -0.19% 947264 949089 -0.19%
stdb_raw u32_u64_str btree_each_column 64 128 1046780 1047833 -0.10% 1079514 1080267 -0.07%
sqlite u32_u64_str unique_0 64 128 398158 398158 0.00% 413106 413106 0.00%
sqlite u32_u64_str btree_each_column 64 128 983481 983475 0.00% 1021031 1021025 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 152791 152791 0.00% 152841 152841 0.00%
stdb_raw u32_u64_str unique_0 64 15816 15816 0.00% 15862 15866 -0.03%
sqlite u32_u64_str unique_0 1024 1046653 1046653 0.00% 1050053 1050053 0.00%
sqlite u32_u64_str unique_0 64 74799 74799 0.00% 75913 75913 0.00%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 json 47374 47374 0.00% 50060 50060 0.00%
64 bsatn 25716 25716 0.00% 27994 27994 0.00%
16 json 12126 12126 0.00% 14030 14030 0.00%
16 bsatn 8117 8117 0.00% 9477 9477 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 20586598 20585379 0.01% 21400284 21399253 0.00%
stdb_raw u32_u64_str unique_0 64 128 1299229 1299251 -0.00% 1356043 1356105 -0.00%
sqlite u32_u64_str unique_0 1024 1024 1802091 1802091 0.00% 1811187 1811187 0.00%
sqlite u32_u64_str unique_0 64 128 128437 128437 0.00% 131265 131265 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 5405 5405 0.00% 5451 5451 0.00%
sqlite 5551 5551 0.00% 6075 6075 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 2 string 117914 117914 0.00% 118538 118526 0.01%
stdb_raw u32_u64_str no_index 64 128 1 u64 75503 75503 0.00% 75907 75907 0.00%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 24061 24065 -0.02% 24505 24509 -0.02%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 23029 23029 0.00% 23517 23497 0.09%
sqlite u32_u64_str no_index 64 128 2 string 146598 146598 0.00% 148384 148384 0.00%
sqlite u32_u64_str no_index 64 128 1 u64 125948 125948 0.00% 127534 127534 0.00%
sqlite u32_u64_str btree_each_column 64 128 2 string 136598 136598 0.00% 138754 138754 0.00%
sqlite u32_u64_str btree_each_column 64 128 1 u64 133440 133446 -0.00% 135292 135302 -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 844465 844190 0.03% 897611 896740 0.10%
stdb_raw u32_u64_str btree_each_column 64 128 996224 995612 0.06% 1060198 1060232 -0.00%
sqlite u32_u64_str unique_0 64 128 415695 415695 0.00% 429949 429957 -0.00%
sqlite u32_u64_str btree_each_column 64 128 1021736 1021736 0.00% 1058438 1058438 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 152801 152801 0.00% 152863 152875 -0.01%
stdb_raw u32_u64_str unique_0 64 15826 15826 0.00% 15872 15872 0.00%
sqlite u32_u64_str unique_0 1024 1049721 1049721 0.00% 1053443 1053443 0.00%
sqlite u32_u64_str unique_0 64 76571 76571 0.00% 77865 77865 0.00%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 json 47374 47374 0.00% 50060 50060 0.00%
64 bsatn 25716 25716 0.00% 27994 27994 0.00%
16 json 12126 12126 0.00% 14030 14030 0.00%
16 bsatn 8117 8117 0.00% 9477 9477 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 19291384 19285155 0.03% 20186784 20180705 0.03%
stdb_raw u32_u64_str unique_0 64 128 1251858 1251472 0.03% 1338498 1338144 0.03%
sqlite u32_u64_str unique_0 1024 1024 1809652 1809652 0.00% 1818284 1818284 0.00%
sqlite u32_u64_str unique_0 64 128 132563 132563 0.00% 135523 135523 0.00%

Please sign in to comment.