Skip to content

Commit

Permalink
Renamed database instance to replica (#1806)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloutiertyler authored Oct 5, 2024
1 parent 126dcae commit d6bb05b
Show file tree
Hide file tree
Showing 33 changed files with 387 additions and 394 deletions.
58 changes: 29 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 23 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,34 +80,34 @@ inherits = "release"
debug = true

[workspace.package]
version = "0.12.0"
version = "1.0.0-rc1"
edition = "2021"
# update rust-toolchain.toml too!
rust-version = "1.78.0"

[workspace.dependencies]
spacetimedb = { path = "crates/bindings", version = "0.12.0" }
spacetimedb-bindings-macro = { path = "crates/bindings-macro", version = "0.12.0" }
spacetimedb-bindings-sys = { path = "crates/bindings-sys", version = "0.12.0" }
spacetimedb-cli = { path = "crates/cli", version = "0.12.0" }
spacetimedb-client-api = { path = "crates/client-api", version = "0.12.0" }
spacetimedb-client-api-messages = { path = "crates/client-api-messages", version = "0.12.0" }
spacetimedb-commitlog = { path = "crates/commitlog", version = "0.12.0" }
spacetimedb-core = { path = "crates/core", version = "0.12.0" }
spacetimedb-data-structures = { path = "crates/data-structures", version = "0.12.0" }
spacetimedb-durability = { path = "crates/durability", version = "0.12.0" }
spacetimedb-lib = { path = "crates/lib", default-features = false, version = "0.12.0" }
spacetimedb-metrics = { path = "crates/metrics", version = "0.12.0" }
spacetimedb-primitives = { path = "crates/primitives", version = "0.12.0" }
spacetimedb-query-planner = { path = "crates/planner", version = "0.12.0" }
spacetimedb-sats = { path = "crates/sats", version = "0.12.0" }
spacetimedb-schema = { path = "crates/schema", version = "0.12.0" }
spacetimedb-standalone = { path = "crates/standalone", version = "0.12.0" }
spacetimedb-sql-parser = { path = "crates/sql-parser", version = "0.12.0" }
spacetimedb-table = { path = "crates/table", version = "0.12.0" }
spacetimedb-vm = { path = "crates/vm", version = "0.12.0" }
spacetimedb-fs-utils = { path = "crates/fs-utils", version = "0.12.0" }
spacetimedb-snapshot = { path = "crates/snapshot", version = "0.12.0" }
spacetimedb = { path = "crates/bindings", version = "1.0.0-rc1" }
spacetimedb-bindings-macro = { path = "crates/bindings-macro", version = "1.0.0-rc1" }
spacetimedb-bindings-sys = { path = "crates/bindings-sys", version = "1.0.0-rc1" }
spacetimedb-cli = { path = "crates/cli", version = "1.0.0-rc1" }
spacetimedb-client-api = { path = "crates/client-api", version = "1.0.0-rc1" }
spacetimedb-client-api-messages = { path = "crates/client-api-messages", version = "1.0.0-rc1" }
spacetimedb-commitlog = { path = "crates/commitlog", version = "1.0.0-rc1" }
spacetimedb-core = { path = "crates/core", version = "1.0.0-rc1" }
spacetimedb-data-structures = { path = "crates/data-structures", version = "1.0.0-rc1" }
spacetimedb-durability = { path = "crates/durability", version = "1.0.0-rc1" }
spacetimedb-lib = { path = "crates/lib", default-features = false, version = "1.0.0-rc1" }
spacetimedb-metrics = { path = "crates/metrics", version = "1.0.0-rc1" }
spacetimedb-primitives = { path = "crates/primitives", version = "1.0.0-rc1" }
spacetimedb-query-planner = { path = "crates/planner", version = "1.0.0-rc1" }
spacetimedb-sats = { path = "crates/sats", version = "1.0.0-rc1" }
spacetimedb-schema = { path = "crates/schema", version = "1.0.0-rc1" }
spacetimedb-standalone = { path = "crates/standalone", version = "1.0.0-rc1" }
spacetimedb-sql-parser = { path = "crates/sql-parser", version = "1.0.0-rc1" }
spacetimedb-table = { path = "crates/table", version = "1.0.0-rc1" }
spacetimedb-vm = { path = "crates/vm", version = "1.0.0-rc1" }
spacetimedb-fs-utils = { path = "crates/fs-utils", version = "1.0.0-rc1" }
spacetimedb-snapshot = { path = "crates/snapshot", version = "1.0.0-rc1" }

ahash = "0.8"
anyhow = "1.0.68"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Business Source License 1.1
Parameters

Licensor: Clockwork Laboratories, Inc.
Licensed Work: SpacetimeDB 0.12.0
Licensed Work: SpacetimeDB 1.0.0-rc1
The Licensed Work is
(c) 2023 Clockwork Laboratories, Inc.

Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/subcommands/project/rust/Cargo._toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ edition = "2021"
crate-type = ["cdylib"]

[dependencies]
spacetimedb = "0.12.0"
spacetimedb = "1.0.0-rc1"
log = "0.4"
24 changes: 12 additions & 12 deletions crates/client-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use spacetimedb::client::ClientActorIndex;
use spacetimedb::energy::{EnergyBalance, EnergyQuanta};
use spacetimedb::host::{HostController, UpdateDatabaseResult};
use spacetimedb::identity::Identity;
use spacetimedb::messages::control_db::{Database, DatabaseInstance, HostType, IdentityEmail, Node};
use spacetimedb::messages::control_db::{Database, HostType, IdentityEmail, Node, Replica};
use spacetimedb::sendgrid_controller::SendGridController;
use spacetimedb_client_api_messages::name::{DomainName, InsertDomainResult, RegisterTldResult, Tld};
use spacetimedb_client_api_messages::recovery::RecoveryCode;
Expand Down Expand Up @@ -92,10 +92,10 @@ pub trait ControlStateReadAccess {
fn get_database_by_address(&self, address: &Address) -> anyhow::Result<Option<Database>>;
fn get_databases(&self) -> anyhow::Result<Vec<Database>>;

// Database instances
fn get_database_instance_by_id(&self, id: u64) -> anyhow::Result<Option<DatabaseInstance>>;
fn get_database_instances(&self) -> anyhow::Result<Vec<DatabaseInstance>>;
fn get_leader_database_instance_by_database(&self, database_id: u64) -> Option<DatabaseInstance>;
// Replicas
fn get_replica_by_id(&self, id: u64) -> anyhow::Result<Option<Replica>>;
fn get_replicas(&self) -> anyhow::Result<Vec<Replica>>;
fn get_leader_replica_by_database(&self, database_id: u64) -> Option<Replica>;

// Identities
fn get_identities_for_email(&self, email: &str) -> anyhow::Result<Vec<IdentityEmail>>;
Expand Down Expand Up @@ -174,15 +174,15 @@ impl<T: ControlStateReadAccess + ?Sized> ControlStateReadAccess for Arc<T> {
(**self).get_databases()
}

// Database instances
fn get_database_instance_by_id(&self, id: u64) -> anyhow::Result<Option<DatabaseInstance>> {
(**self).get_database_instance_by_id(id)
// Replicas
fn get_replica_by_id(&self, id: u64) -> anyhow::Result<Option<Replica>> {
(**self).get_replica_by_id(id)
}
fn get_database_instances(&self) -> anyhow::Result<Vec<DatabaseInstance>> {
(**self).get_database_instances()
fn get_replicas(&self) -> anyhow::Result<Vec<Replica>> {
(**self).get_replicas()
}
fn get_leader_database_instance_by_database(&self, database_id: u64) -> Option<DatabaseInstance> {
(**self).get_leader_database_instance_by_database(database_id)
fn get_leader_replica_by_database(&self, database_id: u64) -> Option<Replica> {
(**self).get_leader_replica_by_database(database_id)
}

// Identities
Expand Down
Loading

2 comments on commit d6bb05b

@github-actions
Copy link

@github-actions github-actions bot commented on d6bb05b 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 💿 419.9±2.96ns 410.9±1.92ns - -
sqlite 🧠 429.2±1.90ns 406.7±1.80ns - -
stdb_raw 💿 622.8±1.69ns 621.5±0.84ns - -
stdb_raw 🧠 622.7±1.41ns 624.0±3.21ns - -

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.8±2.21µs 583.5±1.40µs 1712 tx/sec 1713 tx/sec
sqlite 💿 u32_u64_str unique_0 2048 256 149.3±0.36µs 147.1±0.46µs 6.5 Ktx/sec 6.6 Ktx/sec
sqlite 💿 u32_u64_u64 btree_each_column 2048 256 476.6±25.87µs 471.7±13.25µs 2.0 Ktx/sec 2.1 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 2048 256 141.2±16.32µs 142.0±21.79µs 6.9 Ktx/sec 6.9 Ktx/sec
sqlite 🧠 u32_u64_str btree_each_column 2048 256 450.0±0.41µs 446.3±0.36µs 2.2 Ktx/sec 2.2 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 2048 256 125.1±0.42µs 121.9±0.46µs 7.8 Ktx/sec 8.0 Ktx/sec
sqlite 🧠 u32_u64_u64 btree_each_column 2048 256 365.2±0.64µs 366.3±0.76µs 2.7 Ktx/sec 2.7 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 2048 256 107.8±0.40µs 104.5±0.43µs 9.1 Ktx/sec 9.3 Ktx/sec
stdb_raw 💿 u32_u64_str btree_each_column 2048 256 603.0±20.79µs 588.8±17.57µs 1658 tx/sec 1698 tx/sec
stdb_raw 💿 u32_u64_str unique_0 2048 256 411.0±14.22µs 481.5±39.34µs 2.4 Ktx/sec 2.0 Ktx/sec
stdb_raw 💿 u32_u64_u64 btree_each_column 2048 256 341.9±9.43µs 379.4±5.50µs 2.9 Ktx/sec 2.6 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 2048 256 356.3±7.02µs 345.7±12.43µs 2.7 Ktx/sec 2.8 Ktx/sec
stdb_raw 🧠 u32_u64_str btree_each_column 2048 256 321.2±0.17µs 306.8±0.23µs 3.0 Ktx/sec 3.2 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 2048 256 237.8±0.22µs 236.5±0.57µs 4.1 Ktx/sec 4.1 Ktx/sec
stdb_raw 🧠 u32_u64_u64 btree_each_column 2048 256 250.8±0.30µs 243.8±0.07µs 3.9 Ktx/sec 4.0 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 2048 256 219.2±0.64µs 216.4±0.16µs 4.5 Ktx/sec 4.5 Ktx/sec

iterate

db on disk schema indices new latency old latency new throughput old throughput
sqlite 💿 u32_u64_str unique_0 21.9±0.07µs 23.1±0.11µs 44.6 Ktx/sec 42.2 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 20.9±0.14µs 20.6±0.06µs 46.8 Ktx/sec 47.4 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 19.4±0.05µs 19.5±0.10µs 50.4 Ktx/sec 50.2 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 17.7±0.09µs 17.9±0.16µs 55.2 Ktx/sec 54.5 Ktx/sec
stdb_raw 💿 u32_u64_str unique_0 4.0±0.00µs 4.0±0.00µs 246.9 Ktx/sec 246.0 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 3.9±0.00µs 3.9±0.00µs 252.6 Ktx/sec 252.0 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 4.0±0.00µs 4.0±0.00µs 246.4 Ktx/sec 245.3 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 3.9±0.00µs 3.9±0.00µs 252.8 Ktx/sec 251.8 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 70.6±0.26µs 68.1±0.20µs 13.8 Ktx/sec 14.4 Ktx/sec
sqlite 💿 u64 index 2048 256 66.3±0.11µs 64.9±0.33µs 14.7 Ktx/sec 15.0 Ktx/sec
sqlite 🧠 string index 2048 256 66.0±0.26µs 64.2±0.24µs 14.8 Ktx/sec 15.2 Ktx/sec
sqlite 🧠 u64 index 2048 256 60.0±0.29µs 58.6±0.14µs 16.3 Ktx/sec 16.7 Ktx/sec
stdb_raw 💿 string index 2048 256 4.9±0.00µs 4.9±0.00µs 198.8 Ktx/sec 198.9 Ktx/sec
stdb_raw 💿 u64 index 2048 256 4.8±0.00µs 4.8±0.00µs 204.8 Ktx/sec 204.3 Ktx/sec
stdb_raw 🧠 string index 2048 256 4.9±0.00µs 4.9±0.00µs 198.6 Ktx/sec 198.5 Ktx/sec
stdb_raw 🧠 u64 index 2048 256 4.8±0.00µs 4.8±0.00µs 205.0 Ktx/sec 204.3 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.01µs 29.1 Mtx/sec 29.3 Mtx/sec
u32_u64_str bflatn_to_bsatn_slow_path 100 3.1±0.01µs 3.0±0.01µs 31.1 Mtx/sec 31.8 Mtx/sec
u32_u64_str bsatn 100 2.4±0.00µs 2.5±0.01µs 39.7 Mtx/sec 37.8 Mtx/sec
u32_u64_str bsatn 100 40.5±0.10ns 40.5±0.10ns 2.3 Gtx/sec 2.3 Gtx/sec
u32_u64_str json 100 5.4±0.02µs 5.7±0.16µs 17.6 Mtx/sec 16.7 Mtx/sec
u32_u64_str json 100 7.3±0.09µs 7.9±0.01µs 13.1 Mtx/sec 12.1 Mtx/sec
u32_u64_str product_value 100 1018.8±3.33ns 1017.2±0.57ns 93.6 Mtx/sec 93.8 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_fast_path 100 1107.7±7.61ns 1129.2±3.91ns 86.1 Mtx/sec 84.5 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_slow_path 100 2.5±0.00µs 2.4±0.00µs 38.6 Mtx/sec 39.0 Mtx/sec
u32_u64_u64 bsatn 100 1729.2±37.38ns 1706.0±39.52ns 55.2 Mtx/sec 55.9 Mtx/sec
u32_u64_u64 bsatn 100 39.3±0.25ns 29.1±0.22ns 2.4 Gtx/sec 3.2 Gtx/sec
u32_u64_u64 json 100 3.4±0.23µs 3.2±0.05µs 28.1 Mtx/sec 29.5 Mtx/sec
u32_u64_u64 json 100 5.1±0.12µs 4.9±0.22µs 18.6 Mtx/sec 19.5 Mtx/sec
u32_u64_u64 product_value 100 1014.7±1.31ns 1014.4±1.35ns 94.0 Mtx/sec 94.0 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_fast_path 100 905.4±2.93ns 900.7±2.38ns 105.3 Mtx/sec 105.9 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_slow_path 100 2.5±0.01µs 2.5±0.00µs 38.5 Mtx/sec 38.9 Mtx/sec
u64_u64_u32 bsatn 100 1719.1±37.85ns 1678.2±29.98ns 55.5 Mtx/sec 56.8 Mtx/sec
u64_u64_u32 bsatn 100 749.7±0.49ns 750.1±0.55ns 127.2 Mtx/sec 127.1 Mtx/sec
u64_u64_u32 json 100 3.4±0.04µs 3.5±0.01µs 28.3 Mtx/sec 27.0 Mtx/sec
u64_u64_u32 json 100 4.9±0.00µs 4.7±0.02µs 19.3 Mtx/sec 20.1 Mtx/sec
u64_u64_u32 product_value 100 1018.8±0.49ns 1017.9±7.50ns 93.6 Mtx/sec 93.7 Mtx/sec

stdb_module_large_arguments

arg size new latency old latency new throughput old throughput
64KiB 109.1±11.28µs 107.2±9.69µs - -

stdb_module_print_bulk

line count new latency old latency new throughput old throughput
1 52.9±6.07µs 55.2±6.63µs - -
100 602.5±7.22µs 600.3±5.09µs - -
1000 5.4±0.04ms 3.4±0.19ms - -

remaining

name new latency old latency new throughput old throughput
special/db_game/circles/load=10 308.1±4.29µs 313.4±3.25µs - -
special/db_game/circles/load=100 310.0±2.97µs 313.5±4.55µ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.25µs 55.7±0.49µs 17.5 Ktx/sec 17.5 Ktx/sec
sqlite/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 51.3±10.61µs 48.0±0.27µs 19.0 Ktx/sec 20.4 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 40.5±0.36µs 40.7±0.27µs 24.1 Ktx/sec 24.0 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 35.6±0.33µs 36.5±0.23µs 27.5 Ktx/sec 26.8 Ktx/sec
stdb_module/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 1292.0±12.48µs 1294.9±17.95µs 773 tx/sec 772 tx/sec
stdb_module/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 1025.4±12.56µs 1043.0±5.85µs 975 tx/sec 958 tx/sec
stdb_raw/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 652.5±19.35µs 638.6±16.04µs 1532 tx/sec 1565 tx/sec
stdb_raw/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 489.9±10.60µs 491.9±7.60µs 2041 tx/sec 2032 tx/sec
stdb_raw/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 374.6±1.36µs 372.1±0.70µs 2.6 Ktx/sec 2.6 Ktx/sec
stdb_raw/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 335.4±0.45µs 336.7±0.46µs 2.9 Ktx/sec 2.9 Ktx/sec

@github-actions
Copy link

@github-actions github-actions bot commented on d6bb05b 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% 5475 5441 0.62%
sqlite 5509 5509 0.00% 5909 5973 -1.07%

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 117909 117904 0.00% 118481 118548 -0.06%
stdb_raw u32_u64_str no_index 64 128 1 u64 75498 75493 0.01% 75848 75929 -0.11%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 24057 24052 0.02% 24541 24504 0.15%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 23025 23019 0.03% 23459 23495 -0.15%
sqlite u32_u64_str no_index 64 128 2 string 144677 144677 0.00% 146291 146227 0.04%
sqlite u32_u64_str no_index 64 128 1 u64 124027 124027 0.00% 125407 125385 0.02%
sqlite u32_u64_str btree_each_column 64 128 2 string 134476 134476 0.00% 136290 136210 0.06%
sqlite u32_u64_str btree_each_column 64 128 1 u64 131354 131344 0.01% 132918 132838 0.06%

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 893652 894004 -0.04% 943330 947264 -0.42%
stdb_raw u32_u64_str btree_each_column 64 128 1049283 1046780 0.24% 1112521 1079514 3.06%
sqlite u32_u64_str unique_0 64 128 398158 398158 0.00% 414742 413106 0.40%
sqlite u32_u64_str btree_each_column 64 128 983485 983481 0.00% 1024309 1021031 0.32%

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% 152871 152841 0.02%
stdb_raw u32_u64_str unique_0 64 15816 15816 0.00% 15884 15862 0.14%
sqlite u32_u64_str unique_0 1024 1046653 1046653 0.00% 1049929 1050053 -0.01%
sqlite u32_u64_str unique_0 64 74799 74799 0.00% 75833 75913 -0.11%

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% 49992 50060 -0.14%
64 bsatn 25716 25716 0.00% 27960 27994 -0.12%
16 json 12126 12126 0.00% 13996 14030 -0.24%
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 20601480 20586598 0.07% 21265272 21400284 -0.63%
stdb_raw u32_u64_str unique_0 64 128 1300269 1299229 0.08% 1344785 1356043 -0.83%
sqlite u32_u64_str unique_0 1024 1024 1802091 1802091 0.00% 1811311 1811187 0.01%
sqlite u32_u64_str unique_0 64 128 128437 128437 0.00% 131225 131265 -0.03%
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% 5485 5451 0.62%
sqlite 5551 5551 0.00% 6019 6075 -0.92%

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 117919 117914 0.00% 118423 118538 -0.10%
stdb_raw u32_u64_str no_index 64 128 1 u64 75508 75503 0.01% 75806 75907 -0.13%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 24068 24061 0.03% 24544 24505 0.16%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 23035 23029 0.03% 23461 23517 -0.24%
sqlite u32_u64_str no_index 64 128 2 string 146598 146598 0.00% 148472 148384 0.06%
sqlite u32_u64_str no_index 64 128 1 u64 125948 125948 0.00% 127540 127534 0.00%
sqlite u32_u64_str btree_each_column 64 128 2 string 136598 136598 0.00% 138786 138754 0.02%
sqlite u32_u64_str btree_each_column 64 128 1 u64 133440 133440 0.00% 135382 135292 0.07%

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 844052 844465 -0.05% 894800 897611 -0.31%
stdb_raw u32_u64_str btree_each_column 64 128 994904 996224 -0.13% 1058648 1060198 -0.15%
sqlite u32_u64_str unique_0 64 128 415695 415695 0.00% 431611 429949 0.39%
sqlite u32_u64_str btree_each_column 64 128 1021736 1021736 0.00% 1061278 1058438 0.27%

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% 152893 152863 0.02%
stdb_raw u32_u64_str unique_0 64 15826 15826 0.00% 15894 15872 0.14%
sqlite u32_u64_str unique_0 1024 1049721 1049721 0.00% 1053519 1053443 0.01%
sqlite u32_u64_str unique_0 64 76571 76571 0.00% 77897 77865 0.04%

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% 49992 50060 -0.14%
64 bsatn 25716 25716 0.00% 27960 27994 -0.12%
16 json 12126 12126 0.00% 13996 14030 -0.24%
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 19302722 19291384 0.06% 19986094 20186784 -0.99%
stdb_raw u32_u64_str unique_0 64 128 1252885 1251858 0.08% 1326797 1338498 -0.87%
sqlite u32_u64_str unique_0 1024 1024 1809652 1809652 0.00% 1818344 1818284 0.00%
sqlite u32_u64_str unique_0 64 128 132563 132563 0.00% 135567 135523 0.03%

Please sign in to comment.