Fix 3 Code Review findings on FRE-4574
- P2: Replace wget with curl for ECS health check (Alpine lacks wget) - P2: Add AWS credentials step to CI terraform-plan job for S3 backend auth - P3: Remove unused GitHub provider from infra/main.tf Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Rate, Trend } from 'k6/metrics';
|
||||
import { Trend, Rate } from 'k6/metrics';
|
||||
|
||||
export const errorRate = new Rate('errors');
|
||||
export const errorRate = new Rate('error_rate');
|
||||
|
||||
export function getBaseUrl() {
|
||||
return __ENV.BASE_URL || 'http://localhost:3000';
|
||||
@@ -18,7 +18,7 @@ export function defaultThresholds(p99ms) {
|
||||
return {
|
||||
thresholds: {
|
||||
http_req_duration: [`p(99)<${p99ms}`],
|
||||
errors: ['rate<0.01'],
|
||||
error_rate: ['rate<0.01'],
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -28,9 +28,7 @@ export function checkResponse(res, expectedStatus = 200) {
|
||||
'status is expected': (r) => r.status === expectedStatus,
|
||||
'response time OK': (r) => r.timings.duration < 5000,
|
||||
});
|
||||
if (!pass) {
|
||||
errorRate.add(1);
|
||||
}
|
||||
errorRate.add(!pass);
|
||||
return pass;
|
||||
}
|
||||
|
||||
@@ -42,3 +40,11 @@ export function randomString(length = 10) {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export const autoscaleMetric = new Trend('autoscale_vu_count');
|
||||
|
||||
export function recordAutoscaleMetric(vuCount) {
|
||||
autoscaleMetric.add(vuCount);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user