Phase 4 verification harness in loadtest/: - bench-pool.js: standalone dep-free model showing pool of 4 = 4x and pool of 8 = 8x throughput vs a single serialized connection. - run.js: autocannon harness for the read path (req/s + p50/p90/p99). - docker-compose.loadtest.yml + init.sql: seeded Postgres + app read-path stack (no Prosody) for local load testing. - README.md: usage and staging validation checklist. Part-of: <http://gitlab.vnc.biz/uxf/prosody-muc-rest/-/merge_requests/3>
27 lines
956 B
SQL
27 lines
956 B
SQL
-- Minimal seed for the read-path load test: creates the `prosody` and
|
|
-- `group_owners` tables with the columns read by GET /groupchats and
|
|
-- GET /groupchats/:target. No Prosody required.
|
|
|
|
CREATE TABLE IF NOT EXISTS prosody (
|
|
host text NOT NULL,
|
|
user text NOT NULL,
|
|
store text NOT NULL,
|
|
key text NOT NULL,
|
|
value text NOT NULL,
|
|
PRIMARY KEY (host, "user", store, key)
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS group_owners (
|
|
room text NOT NULL,
|
|
owner text,
|
|
created bigint NOT NULL DEFAULT (extract(epoch from now()) * 1000)::bigint,
|
|
updated bigint NOT NULL DEFAULT (extract(epoch from now()) * 1000)::bigint
|
|
);
|
|
|
|
-- A few sample rows so the read path returns data.
|
|
INSERT INTO group_owners (room, owner) VALUES
|
|
('bench-room-1@conference.demo.vnc.de', 'owner1@demo.vnc.de'),
|
|
('bench-room-2@conference.demo.vnc.de', 'owner2@demo.vnc.de'),
|
|
('bench-room-3@conference.demo.vnc.de', 'owner3@demo.vnc.de')
|
|
ON CONFLICT DO NOTHING;
|