초기커밋

This commit is contained in:
2025-05-01 07:20:41 +09:00
commit 98bb2e3c5c
2747 changed files with 646947 additions and 0 deletions

View File

@@ -0,0 +1,170 @@
export const singleOptions = {
scenarios: {
authTest: {
executor: 'per-vu-iterations',
vus: 1,
iterations: 1,
exec: 'authTest',
},
questEditTest: {
executor: 'per-vu-iterations',
vus: 1,
iterations: 1,
exec: 'questEditTest',
}
}
};
export const smokeOptions = {
scenarios: {
authTest: {
executor: 'constant-vus',
vus: 3,
duration: '30s',
exec: 'authTest',
},
questEditTest: {
executor: 'constant-vus',
vus: 3,
duration: '30s',
exec: 'questEditTest',
}
}
};
export const loadOptions = {
scenarios: {
authTest: {
executor: 'ramping-vus',
stages: [
{ duration: '2m', target: 100 }, // ramp up for 2 minutes
{ duration: '10m', target: 100 }, // hold for 10 minutes
{ duration: '2m', target: 0 }, // ramp down for 2 minutes
],
exec: 'authTest',
},
questEditTest: {
executor: 'ramping-vus',
stages: [
{ duration: '2m', target: 100 }, // ramp up for 2 minutes
{ duration: '10m', target: 100 }, // hold for 10 minutes
{ duration: '2m', target: 0 }, // ramp down for 2 minutes
],
exec: 'questEditTest',
}
}
};
export const stressOptions = {
scenarios: {
authTest: {
executor: 'ramping-vus',
stages: [
{ duration: '10m', target: 500 },
{ duration: '30m', target: 500 },
{ duration: '5m', target: 0 },
],
exec: 'authTest',
},
questEditTest: {
executor: 'ramping-vus',
stages: [
{ duration: '10m', target: 500 },
{ duration: '30m', target: 500 },
{ duration: '5m', target: 0 },
],
exec: 'questEditTest',
}
}
};
export const soakOptions = {
scenarios: {
authTest: {
executor: 'ramping-vus',
stages: [
{ duration: '2m', target: 500 },
{ duration: '5h', target: 500 },
{ duration: '5m', target: 0 },
],
exec: 'authTest',
},
questEditTest: {
executor: 'ramping-vus',
stages: [
{ duration: '2m', target: 500 },
{ duration: '5h', target: 500 },
{ duration: '5m', target: 0 },
],
exec: 'questEditTest',
}
}
};
export const spikeOptions = {
scenarios: {
authTest: {
executor: 'ramping-vus',
stages: [
{ duration: '2m', target: 2000 },
{ duration: '1m', target: 0 },
],
exec: 'authTest',
},
questEditTest: {
executor: 'ramping-vus',
stages: [
{ duration: '2m', target: 2000 },
{ duration: '1m', target: 0 },
],
exec: 'questEditTest',
}
}
};
export const breakpointOptions = {
scenarios: {
authTest: {
executor: 'ramping-arrival-rate',
preAllocatedVUs: 20000,
stages: [
{ duration: '2h', target: 20000 }, // just slowly ramp-up to a HUGE load
],
exec: 'authTest',
},
questEditTest: {
executor: 'ramping-arrival-rate',
preAllocatedVUs: 20000,
stages: [
{ duration: '2h', target: 20000 }, // just slowly ramp-up to a HUGE load
],
exec: 'questEditTest',
}
}
};
export const spikeLocalOptions = {
scenarios: {
authTest: {
executor: 'ramping-vus',
stages: [
{ duration: '2m', target: 100 },
{ duration: '1m', target: 0 },
],
exec: 'authTest',
},
questEditTest: {
executor: 'ramping-vus',
stages: [
{ duration: '2m', target: 100 },
{ duration: '1m', target: 0 },
],
exec: 'questEditTest',
}
}
};

View File

@@ -0,0 +1,2 @@
$env:K6_WEB_DASHBOARD="true"
k6 run script.js

View File

@@ -0,0 +1,62 @@
{
"BeaconId": 1002,
"Title": {
"Kr": "장장안",
"En": "Simmons and Sons",
"Jp": "有限?社福田銀行"
},
"Languages": [
"en",
"kr",
"jp"
],
"Description": {
"Kr": "완벽히 설정된 로컬 포탈",
"En": "Organic leadingedge encoding",
"Jp": "Open-architected disintermediate Graphic Interface"
},
"State": "Live",
"Cost": 0,
"Tasks": [
{
"GoalText": {
"Kr": "아스트라와 대화하기",
"En": "Talk to Astra",
"Jp": "Talk to Astra"
},
"ActionId": 1,
"ActionValue": 1002,
"DialogId": ""
},
{
"GoalText": {
"Kr": "에셀셜 반팔티셔츠 사기",
"En": "buy_item",
"Jp": "buy_item"
},
"ActionId": 3,
"ActionValue": 15130410,
"DialogId": ""
},
{
"GoalText": {
"Kr": "에센셜 반팔 티셔츠 입기",
"En": "에센셜 반팔 티셔츠 입기(영문)",
"Jp": "에센셜 반팔 티셔츠 입기(일어)"
},
"ActionId": 2,
"ActionValue": 15130410,
"DialogId": ""
},
{
"GoalText": {
"Kr": "펠트 울 재킷 팔기",
"En": "펠트 울 재킷 팔기(영문)",
"Jp": "펠트 울 재킷 팔기(일어)"
},
"ActionId": 4,
"ActionValue": 15130410,
"DialogId": ""
}
]
}

View File

@@ -0,0 +1,91 @@
{
"Sequences": [
{
"SequenceId": 0,
"Actions": [
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "안녕하세요. 제이름은 아스트라에요",
"En": "Astra",
"Jp": "Astra"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
},
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "옷 사세요",
"En": "Buy Cloth",
"Jp": "Buy Cloth"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
}
]
},
{
"SequenceId": 1,
"Actions": [
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "이게 맞나??",
"En": "Astra",
"Jp": "Astra"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
},
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "옷 사세요",
"En": "Buy Cloth",
"Jp": "Buy Cloth"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
}
]
},
{
"SequenceId": 2,
"Actions": [
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "시퀀스 아이디 값이 이게 맞나?",
"En": "Astra",
"Jp": "Astra"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
},
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "옷 사세요",
"En": "Buy Cloth",
"Jp": "Buy Cloth"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": -1
}
]
}
]
}

View File

@@ -0,0 +1,91 @@
{
"Sequences": [
{
"SequenceId": 0,
"Actions": [
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "안녕하세요. 제이름은 아스트라에요",
"En": "Astra",
"Jp": "Astra"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
},
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "옷 사세요",
"En": "Buy Cloth",
"Jp": "Buy Cloth"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
}
]
},
{
"SequenceId": 1,
"Actions": [
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "이게 맞나??",
"En": "Astra",
"Jp": "Astra"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
},
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "옷 사세요",
"En": "Buy Cloth",
"Jp": "Buy Cloth"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
}
]
},
{
"SequenceId": 2,
"Actions": [
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "시퀀스 아이디 값이 이게 맞나?",
"En": "Astra",
"Jp": "Astra"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
},
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "옷 사세요",
"En": "Buy Cloth",
"Jp": "Buy Cloth"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
}
]
}
]
}

View File

@@ -0,0 +1,91 @@
{
"Sequences": [
{
"SequenceId": 0,
"Actions": [
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "안녕하세요. 제이름은 아스트라에요",
"En": "Astra",
"Jp": "Astra"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
},
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "옷 사세요",
"En": "Buy Cloth",
"Jp": "Buy Cloth"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
}
]
},
{
"SequenceId": 1,
"Actions": [
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "이게 맞나??",
"En": "Astra",
"Jp": "Astra"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
},
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "옷 사세요",
"En": "Buy Cloth",
"Jp": "Buy Cloth"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
}
]
},
{
"SequenceId": 2,
"Actions": [
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "시퀀스 아이디 값이 이게 맞나?",
"En": "Astra",
"Jp": "Astra"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
},
{
"Talker": "Npc",
"Type": 4,
"Talk": {
"Kr": "옷 사세요",
"En": "Buy Cloth",
"Jp": "Buy Cloth"
},
"Condition": 0,
"ConditionValue": 0,
"NextSequence": 0
}
]
}
]
}

View File

@@ -0,0 +1,210 @@
import http from 'k6/http';
import { Httpx } from 'https://jslib.k6.io/httpx/0.1.0/index.js';
import { sleep, check, group } from 'k6';
import { describe, expect } from 'https://jslib.k6.io/k6chaijs/4.3.4.3/index.js';
import { FormData } from 'https://jslib.k6.io/formdata/0.0.2/index.js';
import { SharedArray } from 'k6/data';
import { vu } from 'k6/execution';
import { Trend } from 'k6/metrics';
import { singleOptions, smokeOptions, loadOptions,
stressOptions, soakOptions, spikeOptions, breakpointOptions, spikeLocalOptions } from './config.js';
// let webApiSession = new Httpx({ baseURL: 'http://localhost:11000' });
// let inGameApiSession = new Httpx({ baseURL: 'http://localhost:11000' });
// let webApiSession = new Httpx({ baseURL: 'https://Metaverse-Stage-UGQAPI-561118213.us-west-2.elb.amazonaws.com:11000' });
// let inGameApiSession = new Httpx({ baseURL: 'https://Metaverse-Stage-UGQAPI-561118213.us-west-2.elb.amazonaws.com:11201' });
let webApiSession = new Httpx({ baseURL: 'https://stage-ugqapi.caliverse.io:11000' });
let inGameApiSession = new Httpx({ baseURL: 'https://stage-ugqapi.caliverse.io:11201' });
export const options = stressOptions;
const ApiKind = {
login: 'login',
account: 'account',
summaires: 'summaires',
newQuest: 'newQuest',
questIamge: 'questIamge',
questDialog: 'questDialog',
questStateToTest: 'questStateToTest',
setTestCompleted: 'setTestCompleted',
questStateToLive: 'questStateToLive',
deleteQuest: 'deleteQuest',
}
const apiCallTrend = {}
apiCallTrend[ApiKind.login] = new Trend('http_req_duration_login', true);
apiCallTrend[ApiKind.account] = new Trend('http_req_duration_account', true);
apiCallTrend[ApiKind.summaires] = new Trend('http_req_duration_summaires', true);
apiCallTrend[ApiKind.newQuest] = new Trend('http_req_duration_newQuest', true);
apiCallTrend[ApiKind.questIamge] = new Trend('http_req_duration_questIamge', true);
apiCallTrend[ApiKind.questDialog] = new Trend('http_req_duration_questDialog', true);
apiCallTrend[ApiKind.questStateToTest] = new Trend('http_req_duration_questStateToTest', true);
apiCallTrend[ApiKind.setTestCompleted] = new Trend('http_req_duration_setTestCompleted', true);
apiCallTrend[ApiKind.questStateToLive] = new Trend('http_req_duration_questStateToLive', true);
apiCallTrend[ApiKind.deleteQuest] = new Trend('http_req_duration_deleteQuest', true);
export function authTest() {
http.get('https://test.k6.io/contacts.php', {
tags: { my_custom_tag: 'contacts' },
});
const username = `ugq_test${vu.idInTest}`;
group(`01. authTest`, (t) => {
const payload = JSON.stringify({
loginAccountId: username
});
const params = {
headers: {
'Content-Type': 'application/json',
},
};
let res = webApiSession.post(`/api/v1/Account/dev-login-v2`, payload, params);
apiCallTrend[ApiKind.login].add(res.timings.duration);
let accessToken = res.json('accessToken');
const authParams = {
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`
},
};
res = webApiSession.get(`/api/v1/QuestEditor/account`, {}, authParams);
apiCallTrend[ApiKind.account].add(res.timings.duration);
res = webApiSession.get(`/api/v1/QuestEditor/summaries?pageSize=100`, payload, authParams);
apiCallTrend[ApiKind.summaires].add(res.timings.duration);
sleep(1);
})
}
const questContent = JSON.parse(open('./sample1/QuestContent.json'));
const questDialogs = [];
questDialogs.push(JSON.parse(open('./sample1/QuestDialog[0].json')));
questDialogs.push(JSON.parse(open('./sample1/QuestDialog[1].json')));
questDialogs.push(JSON.parse(open('./sample1/QuestDialog[2].json')));
export function questEditTest() {
const username = `ugq_test${vu.idInTest}`;
const payload = JSON.stringify({
loginAccountId: username
});
const params = {
headers: {
'Content-Type': 'application/json',
},
};
let res = webApiSession.post(`/api/v1/Account/dev-login-v2`, payload, params);
let accessToken = res.json('accessToken');
let userGuid = res.json('userGuid');
// 퀘스트 전부 삭제하고 시작함
function deleteAllQuests() {
const params = {
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`
},
};
let res = webApiSession.get(`/api/v1/QuestEditor/summaries?pageSize=100`, payload, params);
for (const quest of res.json('summaries')) {
const questContentId = quest['questContentId'];
let res = webApiSession.delete(`/api/v1/QuestEditor/quest/${questContentId}`, {}, params);
}
}
deleteAllQuests();
group(`02. questEditTest`, () => {
const params = {
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`
},
};
let res = webApiSession.post(`/api/v1/QuestEditor/quest`, JSON.stringify(questContent), params);
apiCallTrend[ApiKind.newQuest].add(res.timings.duration);
check(res, { 'added new quest': (r) => r.status === 200 });
sleep(1);
const questContentId = res.json('questContentId');
{
const fd = new FormData();
fd.append('title', '');
fd.append('banner', '');
const params = {
headers: {
'Content-Type': 'multipart/form-data; boundary=' + fd.boundary,
'Authorization': `Bearer ${accessToken}`
},
};
let res = webApiSession.post(`/api/v1/QuestEditor/quest-image/${questContentId}?titleImageId=1&bannerImageId=2`, fd.body(), params);
apiCallTrend[ApiKind.questIamge].add(res.timings.duration);
check(res, { 'added images': (r) => r.status === 200 });
sleep(1);
}
for (let i = 0; i < questDialogs.length; i++) {
const questDialog = questDialogs[i];
let res = webApiSession.post(`/api/v1/QuestEditor/quest-dialog/${questContentId}?taskIndex=${i}`, JSON.stringify(questDialog), params);
apiCallTrend[ApiKind.questDialog].add(res.timings.duration);
check(res, { 'added dialog': (r) => r.status === 200 });
sleep(1);
}
res = webApiSession.patch(`/api/v1/QuestEditor/quest-state/${questContentId}?state=Test`, {}, params);
apiCallTrend[ApiKind.questStateToTest].add(res.timings.duration);
check(res, { 'changed to Test': (r) => r.status === 200 });
sleep(1);
/*
const questId = res.json("questId")
const revision = res.json("revision")
res = inGameApiSession.post(`/api/v1/InGame/set-test-completed/${userGuid}?questId=${questId}&revision=${revision}`);
apiCallTrend[ApiKind.setTestCompleted].add(res.timings.duration);
check(res, { 'changed to Standby': (r) => r.status === 200 });
sleep(1);
res = webApiSession.patch(`/api/v1/QuestEditor/quest-state/${questContentId}?state=Live`, {}, params);
apiCallTrend[ApiKind.questStateToLive].add(res.timings.duration);
check(res, { 'changed to Live': (r) => r.status === 200 });
sleep(1);
*/
res = webApiSession.delete(`/api/v1/QuestEditor/quest/${questContentId}`, {}, params);
apiCallTrend[ApiKind.deleteQuest].add(res.timings.duration);
sleep(1);
})
}

528
UGQApiServer.Tests/setup/package-lock.json generated Normal file
View File

@@ -0,0 +1,528 @@
{
"name": "setup",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "setup",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"node-fetch": "^3.3.2",
"request": "^2.88.2"
}
},
"node_modules/ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/asn1": {
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
"integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
"dependencies": {
"safer-buffer": "~2.1.0"
}
},
"node_modules/assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==",
"engines": {
"node": "*"
}
},
"node_modules/aws4": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.0.tgz",
"integrity": "sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g=="
},
"node_modules/bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
"dependencies": {
"tweetnacl": "^0.14.3"
}
},
"node_modules/caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw=="
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ=="
},
"node_modules/dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==",
"dependencies": {
"assert-plus": "^1.0.0"
},
"engines": {
"node": ">=0.10"
}
},
"node_modules/data-uri-to-buffer": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
"engines": {
"node": ">= 12"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==",
"dependencies": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
}
},
"node_modules/extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"node_modules/extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==",
"engines": [
"node >=0.6.0"
]
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"node_modules/fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
},
"node_modules/fetch-blob": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/jimmywarting"
},
{
"type": "paypal",
"url": "https://paypal.me/jimmywarting"
}
],
"dependencies": {
"node-domexception": "^1.0.0",
"web-streams-polyfill": "^3.0.3"
},
"engines": {
"node": "^12.20 || >= 14.13"
}
},
"node_modules/forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==",
"engines": {
"node": "*"
}
},
"node_modules/form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 0.12"
}
},
"node_modules/formdata-polyfill": {
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
"dependencies": {
"fetch-blob": "^3.1.2"
},
"engines": {
"node": ">=12.20.0"
}
},
"node_modules/getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==",
"dependencies": {
"assert-plus": "^1.0.0"
}
},
"node_modules/har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==",
"engines": {
"node": ">=4"
}
},
"node_modules/har-validator": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
"integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
"deprecated": "this library is no longer supported",
"dependencies": {
"ajv": "^6.12.3",
"har-schema": "^2.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==",
"dependencies": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
},
"engines": {
"node": ">=0.8",
"npm": ">=1.3.7"
}
},
"node_modules/is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA=="
},
"node_modules/isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g=="
},
"node_modules/jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg=="
},
"node_modules/json-schema": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
"integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA=="
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
},
"node_modules/json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="
},
"node_modules/jsprim": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
"integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
"dependencies": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.4.0",
"verror": "1.10.0"
},
"engines": {
"node": ">=0.6.0"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/node-domexception": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/jimmywarting"
},
{
"type": "github",
"url": "https://paypal.me/jimmywarting"
}
],
"engines": {
"node": ">=10.5.0"
}
},
"node_modules/node-fetch": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
"integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
"dependencies": {
"data-uri-to-buffer": "^4.0.0",
"fetch-blob": "^3.1.4",
"formdata-polyfill": "^4.0.10"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/node-fetch"
}
},
"node_modules/oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
"engines": {
"node": "*"
}
},
"node_modules/performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow=="
},
"node_modules/psl": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
"integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="
},
"node_modules/punycode": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"engines": {
"node": ">=6"
}
},
"node_modules/qs": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
"integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
"engines": {
"node": ">=0.6"
}
},
"node_modules/request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
"integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
"deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
"dependencies": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"har-validator": "~5.1.3",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.5.0",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/sshpk": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz",
"integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==",
"dependencies": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
},
"bin": {
"sshpk-conv": "bin/sshpk-conv",
"sshpk-sign": "bin/sshpk-sign",
"sshpk-verify": "bin/sshpk-verify"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
"dependencies": {
"psl": "^1.1.28",
"punycode": "^2.1.1"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
"dependencies": {
"safe-buffer": "^5.0.1"
},
"engines": {
"node": "*"
}
},
"node_modules/tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA=="
},
"node_modules/uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dependencies": {
"punycode": "^2.1.0"
}
},
"node_modules/uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
"bin": {
"uuid": "bin/uuid"
}
},
"node_modules/verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==",
"engines": [
"node >=0.6.0"
],
"dependencies": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
"node_modules/web-streams-polyfill": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
"integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
"engines": {
"node": ">= 8"
}
}
}
}

View File

@@ -0,0 +1,17 @@
{
"name": "setup",
"type": "module",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"node-fetch": "^3.3.2",
"request": "^2.88.2"
}
}

View File

@@ -0,0 +1,32 @@
import fetch from 'node-fetch';
let url = 'http://localhost:11000/api/v1/Development/add-gamedb-account';
const vu = 2000;
const setup = async () => {
for (let i = 1; i < vu; i++) {
const username = `ugq_test${i}`;
const payload = JSON.stringify({
loginAccountId: username,
nickname: username
});
console.log(payload);
const response = await fetch(url, {
method: "POST",
headers: {
'Content-Type': 'application/json',
},
body: payload,
});
const res_data = await response.json();
console.log(res_data);
}
}
setup();