perf(load-tests): run K6 baseline and fix search.js URLSearchParams bug

- Fix search.js: replace URLSearchParams (unsupported in K6) with string interpolation
- Add baseline performance report with latency benchmarks across all 4 suites
- Add load-tests/results/*.json to .gitignore (large raw output files)

Note: pre-existing test failure in create-listing.handler.spec.ts (eventBus.publish mock) — unrelated to this change.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-09 09:29:20 +07:00
parent ee50b4c07c
commit 99fbc1aaca
3 changed files with 142 additions and 13 deletions

View File

@@ -50,13 +50,9 @@ export default function () {
if (iter % 2 === 0) {
// Full-text search
const query = TEXT_QUERIES[iter % TEXT_QUERIES.length];
const params = new URLSearchParams({
q: query,
limit: '20',
offset: '0',
});
const url = `${BASE_URL}/search?q=${encodeURIComponent(query)}&limit=20&offset=0`;
const res = http.get(`${BASE_URL}/search?${params.toString()}`, {
const res = http.get(url, {
tags: { name: 'GET /search (text)' },
});
@@ -71,14 +67,9 @@ export default function () {
} else {
// Geo search
const geo = GEO_SEARCHES[iter % GEO_SEARCHES.length];
const params = new URLSearchParams({
lat: String(geo.lat),
lng: String(geo.lng),
radius: String(geo.radius),
limit: '20',
});
const url = `${BASE_URL}/search/geo?lat=${geo.lat}&lng=${geo.lng}&radius=${geo.radius}&limit=20`;
const res = http.get(`${BASE_URL}/search/geo?${params.toString()}`, {
const res = http.get(url, {
tags: { name: 'GET /search/geo' },
});