Skip to content
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
9 changes: 8 additions & 1 deletion core/crates/cli/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ mod tests {
statement_margin: Duration::from_millis(300),
};

// A short tool call after a handshake with the usual bound: the server answers that itself, and a loaded package
// builder took over 300 ms to.
const SHORT_TOOL: Deadlines = Deadlines {
handshake: Deadlines::TABLEPRO.handshake,
..SHORT
};

// An app whose GTK thread never answers.
struct Stalled;

Expand Down Expand Up @@ -331,7 +338,7 @@ mod tests {
let client = McpClient::connect_within(
&endpoint_at(server.address().port()),
"1.0.0",
SHORT,
SHORT_TOOL,
&crate::runner::tests::STOPPED,
)
.await
Expand Down
8 changes: 5 additions & 3 deletions core/crates/drivers/duckdb/tests/catalog_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ static HEAP: HeapCounter = HeapCounter;
const BOUND: usize = 2 * ByteLimit::CATALOG_DEFAULT.get() as usize;

const KEYS: usize = 1_000;
const NAMED_KEYS: usize = 600;
const NAMED_KEYS: usize = 60;
const NAMED_LENGTH: usize = 640 * 1024;

// DuckDB takes seconds to create and open more than this. One file a real schema could be:
// - a child declaring 1,000 keys into one parent, whose CREATE TABLE, 40 KB, was read again for each of them;
Expand All @@ -45,14 +46,15 @@ fn large_schema() -> String {
)
}

// And one crafted: a child with a 64 KiB name and 600 keys, which DuckDB names after it whatever table a read asks for.
// And one crafted: a child with a 640 KiB name and 60 keys, which DuckDB names after it whatever table a read asks for.
// A read costs keys times name, and DuckDB's open keys squared times name: 600 keys of 64 KiB took over 10 s to open.
fn crafted_schema() -> String {
format!(
"CREATE TABLE named_parent (id INTEGER PRIMARY KEY); \
CREATE TABLE other (id INTEGER PRIMARY KEY); \
CREATE TABLE {} (a INTEGER{}); \
CHECKPOINT;",
"n".repeat(64 * 1024),
"n".repeat(NAMED_LENGTH),
", FOREIGN KEY (a) REFERENCES named_parent (id)".repeat(NAMED_KEYS),
)
}
Expand Down
4 changes: 3 additions & 1 deletion linux/build-aux/flatpak/app.tablepro.TablePro.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"--share=network"
],
"env": {
"LIBCLANG_PATH": "/usr/lib/sdk/llvm22/lib"
"LIBCLANG_PATH": "/usr/lib/sdk/llvm22/lib",
"CARGO_INCREMENTAL": "0",
"CARGO_PROFILE_DEV_DEBUG": "line-tables-only"
},
"test-args": [
"--socket=x11",
Expand Down
Loading