Skip to content

Commit

Permalink
chore: rollback for merge
Browse files Browse the repository at this point in the history
  • Loading branch information
junha-ahn committed Nov 19, 2023
1 parent 6b680e7 commit e0a42d1
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/aws-ecr-push.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: push to ECR

on: push
on:
push:
branches:
- main

env:
AWS_REGION: ap-northeast-2
Expand Down
49 changes: 49 additions & 0 deletions src/performanceTest/scripts/spikeTest/health_spikeTest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { check } from "k6";
import Request from "../lib/request.js";
import { encode } from "../lib/jwt.js";
import hooks from "../lib/hooks.js";
import generator from "../lib/generator.js";
import { isSuccess, randomInt, isAlreadReservedAll, isRunningQueueTicket } from "../lib/helpers.js";

export const setup = hooks.setup
export const handleSummary = hooks.handleSummary

export const options = {
tags: {
testid: `${__ENV.ENTRYPOINT}`
},
ext: {
loadimpact: {
apm: [
{
includeTestRunId: true,
}
]
}
},
scenarios: {
contacts: {
executor: 'per-vu-iterations',
vus: 2000,
iterations: 1,
maxDuration: '1m',
},
},

thresholds: {
http_req_failed: ['rate<0.01'], // http errors should be less than 1%
http_req_duration: ['p(95)<300'], // 95% of requests should be below 300ms
},
};


export default function () {
const req = new Request()

const ID = randomInt(1, 1000000)
req.setToken(encode(ID))

for (let i = 0; i < 10; i++) {
check(req.helthCheck(), {"Success Health": isSuccess});
}
}

0 comments on commit e0a42d1

Please sign in to comment.