-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: fix memory leak in endpoint buffer (#808)
NOTE: Still need to reproduce this locally before merging
- Loading branch information
1 parent
8aba971
commit b36b742
Showing
7 changed files
with
51 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import http from "k6/http"; | ||
import { check, sleep } from "k6"; | ||
|
||
const url = __ENV.URL; | ||
const headers = { | ||
Connection: "keep-alive", | ||
"Content-Type": "application/json", | ||
Authorization: `Bearer ${__ENV.TOKEN || "default_token"}`, | ||
}; | ||
|
||
const payload = JSON.stringify({ | ||
data: "x".repeat(1024 * 1024 * 2), // 2MB payload | ||
}); | ||
|
||
export let options = { | ||
stages: [ | ||
{ duration: "30s", target: 100 }, // Ramp-up to 100 VUs in 30 seconds | ||
{ duration: "1m", target: 100 }, // Stay at 100 VUs for 1 minute | ||
{ duration: "30s", target: 0 }, // Ramp-down to 0 VUs in 30 seconds | ||
], | ||
}; | ||
|
||
export default function () { | ||
const res = http.post(url, payload, { headers }); | ||
check(res, { | ||
"status is 200": (r) => r.status === 200, | ||
}); | ||
|
||
sleep(0.01); // Adjust this to control request rate | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters