Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring IDs for system objects #439

Merged
merged 5 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 84 additions & 21 deletions Cargo.lock

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

25 changes: 13 additions & 12 deletions crates/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,28 @@ bench = false
[dependencies]
spacetimedb-lib = { path = "../lib" }
spacetimedb-core = { path = "../core" }
spacetimedb-sats = { path = "../sats" }
spacetimedb-standalone = { path = "../standalone" }
spacetimedb-client-api = { path = "../client-api" }
spacetimedb-testing = { path = "../testing" }
spacetimedb-primitives = { path = "../primitives" }

ahash.workspace = true
log.workspace = true
clap.workspace = true
rusqlite.workspace = true
criterion.workspace = true
tempfile.workspace = true
rand.workspace = true
tokio.workspace = true
serde_json.workspace = true
serde.workspace = true
anyhow.workspace = true
anymap.workspace = true
byte-unit.workspace = true
clap.workspace = true
criterion.workspace = true
futures.workspace = true
tracing-subscriber.workspace = true
lazy_static.workspace = true
walkdir.workspace = true
regex.workspace = true
log.workspace = true
mimalloc.workspace = true
rand.workspace = true
regex.workspace = true
rusqlite.workspace = true
serde.workspace = true
serde_json.workspace = true
tempdir.workspace = true
tokio.workspace = true
tracing-subscriber.workspace = true
walkdir.workspace = true
2 changes: 1 addition & 1 deletion crates/bench/src/spacetime_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl BenchDatabase for SpacetimeModule {
}
}

#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct TableId {
pascal_case: String,
snake_case: String,
Expand Down
4 changes: 2 additions & 2 deletions crates/bench/src/spacetime_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use spacetimedb_lib::sats::db::def::{IndexDef, TableDef};
use spacetimedb_lib::sats::AlgebraicValue;
use spacetimedb_primitives::{ColId, TableId};
use std::hint::black_box;
use tempfile::TempDir;
use tempdir::TempDir;

pub type DbResult = (RelationalDB, TempDir, u32);

Expand All @@ -28,7 +28,7 @@ impl BenchDatabase for SpacetimeRaw {
where
Self: Sized,
{
let temp_dir = TempDir::with_prefix("stdb_test")?;
let temp_dir = TempDir::new("stdb_test")?;
let db = open_db(temp_dir.path(), in_memory, fsync)?;

Ok(SpacetimeRaw {
Expand Down
4 changes: 2 additions & 2 deletions crates/bench/src/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::{
hint::black_box,
sync::{Arc, RwLock},
};
use tempfile::TempDir;
use tempdir::TempDir;
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't change it at this point, but why did this change in this PR?


/// SQLite benchmark harness.
pub struct SQLite {
Expand All @@ -30,7 +30,7 @@ impl BenchDatabase for SQLite {
where
Self: Sized,
{
let temp_dir = TempDir::with_prefix("sqlite_test")?;
let temp_dir = TempDir::new("sqlite_test")?;
let db = if in_memory {
Connection::open_in_memory()?
} else {
Expand Down
Loading
Loading