feat: run load bench on PostgreSQL with query plans
- bench stand is a separate compose project mtusi-bench (API, Postgres, Valkey) with fixed limits, fresh volume per size and migrations - k6 registers with a password, logs in with Basic and sends Bearer - VACUUM (ANALYZE) and CHECKPOINT after prefill - EXPLAIN (ANALYZE, BUFFERS) of the app's history query via auto_explain, plus the same query without the index in a rolled back transaction - Postgres CPU, table and index size in results; storages in passport - bench_compare checks storage limits, images and settings - remove inproc.py and make bench_inproc Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -19,7 +19,7 @@ export const options = {
|
||||
|
||||
export function setup() {
|
||||
const url = `${API}/chats/${fixture.readChatId}/messages`;
|
||||
const params = { headers: authHeaders(fixture.readerId) };
|
||||
const params = { headers: authHeaders(fixture.tokens[fixture.readerId]) };
|
||||
const positions = [];
|
||||
let cursor = null;
|
||||
let walked = 0;
|
||||
@@ -50,6 +50,8 @@ export function setup() {
|
||||
eligible: eligible.length,
|
||||
first_after: pool.length ? pool[0].after : null,
|
||||
last_after: pool.length ? pool[pool.length - 1].after : null,
|
||||
// позиции курсоров пула: сколько сообщений до каждого (для плана)
|
||||
afters: pool.map((p) => p.after),
|
||||
cursors: pool.map((p) => p.cursor),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user