Skip to content

Commit

Permalink
fix: merge conflict and update bun.lockb
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniciusCestarii committed Dec 16, 2024
2 parents 5684a8c + 8883779 commit e8d2bb9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"start": "NODE_ENV=production bun dist/app.js",
"test": "bun test src/modules/pet/pets/use-cases/ src/modules/pet/species/use-cases/ src/modules/pet/breeds/use-cases/ src/modules/health/patients/use-cases/",
"test:e2e": "bun test src/modules/pet/pets/controllers/ src/modules/pet/species/controllers/ src/modules/pet/breeds/controllers/ src/modules/health/patients/controllers/ --preload src/modules/shared/utilities/test-setup.ts",
"test:performance": "k6 run --out web-dashboard scripts/performance-test.ts",
"generate": "drizzle-kit generate",
"migrate": "drizzle-kit migrate",
"lint": "eslint --fix",
Expand All @@ -20,7 +21,7 @@
"@elysiajs/opentelemetry": "^1.1.7",
"@elysiajs/swagger": "^1.1.6",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.36.4",
"drizzle-orm": "^0.38.2",
"drizzle-typebox": "^0.2.0",
"elysia": "latest",
"pg": "^8.13.1",
Expand All @@ -30,8 +31,9 @@
"devDependencies": {
"@eslint/js": "^9.15.0",
"@types/bun": "latest",
"@types/k6": "^0.54.2",
"@types/pg": "^8.11.10",
"drizzle-kit": "^0.28.1",
"drizzle-kit": "^0.30.1",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
Expand Down
26 changes: 26 additions & 0 deletions scripts/performance-test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import http from "k6/http";

export const options = {
stages: [
{ duration: "30s", target: 20 },
{ duration: "1m", target: 60 },
{ duration: "30s", target: 0 },
],
thresholds: {
http_req_duration: ["avg<100", "p(95)<200"],
http_reqs: ["rate>2000"],
},
noConnectionReuse: true,
};

export default function () {
const data = {
name: "Dog",
};

// basic POST request (first 201 created, then 409 conflict)

http.post("http://localhost:3333/species", JSON.stringify(data), {
headers: { "Content-Type": "application/json" },
});
}

0 comments on commit e8d2bb9

Please sign in to comment.