← back to Stars of Design
smoke: /api/health perf budget (<500ms)
54ab22f14658cd7007dec15694e555ca86b7efde · 2026-05-13 10:59:45 -0700 · Steve Abrams
Files touched
Diff
commit 54ab22f14658cd7007dec15694e555ca86b7efde
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed May 13 10:59:45 2026 -0700
smoke: /api/health perf budget (<500ms)
---
test/smoke.js | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/test/smoke.js b/test/smoke.js
index 3f71fda..4b6e48d 100644
--- a/test/smoke.js
+++ b/test/smoke.js
@@ -109,12 +109,17 @@ function check(name, cond, hint = '') {
check('api: 200', r.status === 200);
check('api: discovery doc', /endpoints/.test(r.body) && /Stars of Design API/.test(r.body));
- // 8a2. /api/health
- r = await fetch('/api/health');
- check('api/health: 200', r.status === 200);
- check('api/health: ok', /"ok":true/.test(r.body));
- check('api/health: uptime_s', /"uptime_s":\d+/.test(r.body));
- check('api/health: counts.designers',/"designers":\d+/.test(r.body));
+ // 8a2. /api/health — perf budget enforced (500ms ceiling)
+ {
+ const t0 = Date.now();
+ r = await fetch('/api/health');
+ const ms = Date.now() - t0;
+ check('api/health: 200', r.status === 200);
+ check('api/health: ok', /"ok":true/.test(r.body));
+ check('api/health: uptime_s', /"uptime_s":\d+/.test(r.body));
+ check('api/health: counts.designers',/"designers":\d+/.test(r.body));
+ check('api/health: <500ms', ms < 500, `actual ${ms}ms`);
+ }
// 8a3. /api/version — deploy fingerprint
r = await fetch('/api/version');
← fe4a506 Makefile: add fleet-status target
·
back to Stars of Design
·
Makefile: add help target listing all available commands d4b32db →