## K6
#### script.js
```
import http from 'k6/http';
import { sleep } from 'k6';
import { parseHTML } from 'k6/html';
import { Counter } from 'k6/metrics';
export const options = {
scenarios: {
// rps_10: {
// executor: 'constant-arrival-rate',
// rate: 10,
// timeUnit: '1s',
// duration: '5m',
// preAllocatedVUs: 5,
// maxVUs: 25,
// startTime: '0s'
// },
// rps_20: {
// executor: 'constant-arrival-rate',
// rate: 20,
// timeUnit: '1s',
// duration: '5m',
// preAllocatedVUs: 10,
// maxVUs: 50,
// startTime: '5m'
// },
// rps_30: {
// executor: 'constant-arrival-rate',
// rate: 30,
// timeUnit: '1s',
// duration: '5m',
// preAllocatedVUs: 15,
// maxVUs: 60,
// startTime: '10m'
// },
// rps_50: {
// executor: 'constant-arrival-rate',
// rate: 50,
// timeUnit: '1s',
// duration: '5m',
// preAllocatedVUs: 25,
// maxVUs: 100,
// startTime: '15m'
// },
rps_250: {
executor: 'constant-arrival-rate',
rate: 50,
timeUnit: '1s',
duration: '10m',
preAllocatedVUs: 200,
maxVUs: 1000,
startTime: '0s'
},
// rps_150: {
// executor: 'constant-arrival-rate',
// rate: 150,
// timeUnit: '1s',
// duration: '5m',
// preAllocatedVUs: 75,
// maxVUs: 300,
// startTime: '5m'
// }
}
};
const statusCounters = {
200: new Counter('http_status_200'),
499: new Counter('http_status_499'),
503: new Counter('http_status_503'),
429: new Counter('http_status_429'),
504: new Counter('http_status_504'),
304: new Counter('http_status_304'),
0: new Counter('http_status_0'),
other: new Counter('http_status_other')
}
export default function() {
const url = 'https://wwwpoc.tsmc.com/api/v1/dynamic-form/publish-data';
const payload = JSON.stringify({
formId: "contact_us_form",
formData: {
question_type: "ESG",
question_type_sub: "General",
first_name: "sdfsdf",
last_name: "sdfsdf",
company_organization: "dsfsdf",
tel: "12312",
email: "sdfsd@fesaf.sef",
questions_comments_or_suggestions: "sefsef",
check_email222: "",
language: "english"
}
});
const headers = {
'Content-Type': 'text/plain;charset=UTF-8',
'Accept': '*/*',
'Accept-Language': 'zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'Priority': 'u=1, i',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-origin',
'Sec-CH-UA': '"Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"',
'Sec-CH-UA-Mobile': '?0',
'Sec-CH-UA-Platform': '"Linux"',
'Referer': 'https://wwwpoc.tsmc.com/english/dynamic-form/contact_us_form',
'Referrer-Policy': 'strict-origin-when-cross-origin',
};
const res = http.post(url, payload, { headers, timeout: '3m' });
if (res.status != 200)
{
console.log(`Status: ${res.status}`);
console.log(`Body: ${res.body}`);
}
const status = res.status;
if (statusCounters[status]) {
statusCounters[status].add(1)
} else {
statusCounters.other.add(1)
}
sleep(1);
}
```
```
import http from 'k6/http';
import { sleep } from 'k6';
import { parseHTML } from 'k6/html';
export const options = {
vus: 100,
duration: '10m'
};
export default function() {
const res_ppp = http.get('https://ppp.tsmc.com/english/news/3131');
const req_ppp_script = parseHTML(res_ppp.body);
req_ppp_script.find('link').toArray().forEach(function (item){
const itemHref = item.attr('href');
// console.log(itemHref);
if(!itemHref.startsWith("http")){
http.get("https://ppp.tsmc.com"+itemHref);
}
})
// http.get('https://pepp.tsmc.com/english/latest-news');
// http.get('https://iiei.tsmc.com/english/quarterly-results/2022/q1');
const req_www = http.get('https://ppp.tsmc.com/english');
const req_www_script = parseHTML(req_www.body);
req_www_script.find('link').toArray().forEach(function (item){
const itemHref = item.attr('href');
// console.log(itemHref);
if(!itemHref.startsWith("http")){
http.get("https://pppp.tsmc.com"+itemHref);
}
})
sleep(1);
}
```
```
import http from 'k6/http';
import { sleep } from 'k6';
import { parseHTML } from 'k6/html';
import { exec } from 'k6/execution';
const TOTAL_RPS = 50;
function rate(percentage) {
return TOTAL_RPS * percentage;
}
export const options = {
scenarios: {
submitForm: {
exec: 'submitForm',
executor: 'constant-arrival-rate',
duration: '10m',
preAllocatedVUs: 5,
maxVUs: 5,
rate: rate(0.5),
timeUnit: '1s'
},
accessIRPage: {
exec: 'accessIRPage',
executor: 'constant-arrival-rate',
duration: '10m',
preAllocatedVUs: 10,
maxVUs: 500,
rate: rate(10),
timeUnit: '1s'
},
accessPRPage: {
exec: 'accessPRPage',
executor: 'constant-arrival-rate',
duration: '10m',
preAllocatedVUs: 10,
maxVUs: 500,
rate: rate(10),
timeUnit: '1s'
},
accessWWWPage: {
exec: 'accessWWWPage',
executor: 'constant-arrival-rate',
duration: '10m',
preAllocatedVUs: 10,
maxVUs: 500,
rate: rate(10),
timeUnit: '1s'
},
// physicalRegistration: {
// exec: 'physicalRegistration',
// executor: 'constant-arrival-rate',
// duration: '60s',
// preAllocatedVUs: 20,
// rate: rate(1)
// },
}
};
export function accessIRPage() {
const res_ir_qr = http.get('https://iiiii.tsmc.com/english/quarterly-results');
const res_ir_qr_script = parseHTML(res_ir_qr.body);
res_ir_qr_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://iiiii.tsmc.com" + itemHref);
}
})
const res_ir_qr_en_with_q = http.get('https://iiiii.tsmc.com/english/quarterly-results/2024/q2');
const res_ir_qr_en_with_q_script = parseHTML(res_ir_qr_en_with_q.body);
res_ir_qr_en_with_q_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://iiiii.tsmc.com" + itemHref);
}
})
const res_ir_qr_ch_with_q = http.get('https://iiiii.tsmc.com/chinese/quarterly-results/2024/q2');
const res_ir_qr_ch_with_q_script = parseHTML(res_ir_qr_ch_with_q.body);
res_ir_qr_ch_with_q_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://iiiii.tsmc.com" + itemHref);
}
})
const res_www_home_en = http.get('https://wwwww.tsmc.com/english');
const res_www_home_en_script = parseHTML(res_www_home_en.body);
res_www_home_en_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://wwwww.tsmc.com" + itemHref);
}
})
const res_www_home_ch = http.get('https://wwwww.tsmc.com/chinese');
const res_www_home_ch_script = parseHTML(res_www_home_ch.body);
res_www_home_ch_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://wwwww.tsmc.com" + itemHref);
}
})
sleep(1);
}
export function accessPRPage() {
const res_pr_latest_news = http.get('https://ppppp.tsmc.com/english/latest-news');
const res_pr_latest_news_script = parseHTML(res_pr_latest_news.body);
res_pr_latest_news_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://ppppp.tsmc.com" + itemHref);
}
})
const res_pr_news = http.get('https://ppppp.tsmc.com/english/news/3134');
const res_pr_news_script = parseHTML(res_pr_news.body);
res_pr_news_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://ppppp.tsmc.com" + itemHref);
}
})
sleep(1);
}
export function accessWWWPage() {
const res_www_home_en = http.get('https://wwwww.tsmc.com/english');
const res_www_home_en_script = parseHTML(res_www_home_en.body);
res_www_home_en_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://wwwww.tsmc.com" + itemHref);
}
})
const res_www_home_ch = http.get('https://wwwww.tsmc.com/chinese');
const res_www_home_ch_script = parseHTML(res_www_home_ch.body);
res_www_home_ch_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://wwwww.tsmc.com" + itemHref);
}
})
sleep(1);
}
export function submitForm() {
const url = "https://iiiii.tsmc.com/english/form/qr-audio-webcast-registration?_webform_dialog=1&_wrapper_format=drupal_modal&ajax_form=1&_wrapper_format=drupal_ajax";
const body = "name%5Bfirst%5D=testNC&name%5Blast%5D=testNC&email=test%40test&company_organization=NCMC&primary_job=Investor+-+Chief+Investment+Officer&year_and_quarter=2024Q2&form_build_id=form-3qmE_CkKWA-0yWvIGZB5FCJZ0QOmowDHii1T28K0P-E&form_id=webform_submission_qr_audio_webcast_registration_add_form&url=&_triggering_element_name=op&_triggering_element_value=SEND&_drupal_ajax=1&ajax_page_state%5Btheme%5D=tsmc_investor_theme&ajax_page_state%5Btheme_token%5D=&ajax_page_state%5Blibraries%5D=addtoany%2Faddtoany.front%2Casset_injector%2Fcss%2Fcreate_new_account%2Casset_injector%2Fjs%2Ffield_date_reverse%2Cbootstrap_barrio%2Fbreadcrumb%2Cbootstrap_barrio%2Fform%2Cbootstrap_barrio%2Fglobal-styling%2Cbootstrap_barrio%2Flinks%2Cbootstrap_barrio%2Fnode%2Cbootstrap_sass%2Ffonts%2Cbootstrap_sass%2Fglobal-styling%2Cbootstrap_sass%2Fgoogle-analytics%2Cclientside_validation_jquery%2Fcv.jquery.ckeditor%2Cclientside_validation_jquery%2Fcv.jquery.validate%2Cclientside_validation_jquery%2Fcv.pattern.method%2Ccore%2Finternal.jquery.form%2Ceu_cookie_compliance%2Feu_cookie_compliance_default%2Cextlink%2Fdrupal.extlink%2Cfontawesome%2Ffontawesome.webfonts%2Cfontawesome%2Ffontawesome.webfonts.shim%2Cgoogle_analytics%2Fgoogle_analytics%2Cgoogle_cse%2FgooglecseWatermark%2Cparagraphs%2Fdrupal.paragraphs.unpublished%2Ctsmc_investor_theme%2Fglobal-styling%2Ctsmc_investor_theme%2Fquarterly-result-library%2Cwebform%2Fwebform.ajax%2Cwebform%2Fwebform.composite%2Cwebform%2Fwebform.dialog%2Cwebform%2Fwebform.element.details.save%2Cwebform%2Fwebform.element.details.toggle%2Cwebform%2Fwebform.element.flexbox%2Cwebform%2Fwebform.element.message%2Cwebform%2Fwebform.element.select%2Cwebform%2Fwebform.form%2Cwebform%2Fwebform.form.submit_once";
http.post(url, body, {
headers: {
"accept": "application/json, text/javascript, */*; q=0.01",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Google Chrome\";v=\"114\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Linux\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
}
})
}
export function physicalRegistration(){
const url = "https://iiiii.tsmc.com/english/form/qr-physical-conference.2024Q2?_webform_dialog=1&_wrapper_format=drupal_modal&ajax_form=1&_wrapper_format=drupal_ajax"
// const randomStringForMail = randomString(5);
const body = "name%5Bfirst%5D=test&name%5Blast%5D=test&email=k6%40testfor300w"+Date.now()+".com&company_organization=test&primary_job=Investor+-+Portfolio%2FFund+Manager&job_title=test&telephone=09123456789&country=Austria&year_and_quarter=2024Q2&venue=Shangri-La+Far+Eastern%2C+Taipei%2C+3F+Grand+Ballroom&address=201+Tun+Hwa+South+Road%2C+Section+2%2C+Taipei+10675+Taiwan&date=2024-07-18+14%3A00%3A00&event_title=Attend+in+person+(Registration+deadline+is+5%3A00+pm%2C+July+17%2C+2024%2C+Taiwan+time)+&form_build_id=form-bh_riaHlPSS0xPBqhLnLI76PBlVYmn_1ZvYHWJMa2Ns&form_id=webform_submission_qr_physical_conference.2024Q2_add_form&_triggering_element_name=op&_triggering_element_value=SEND&_drupal_ajax=1&ajax_page_state%5Btheme%5D=tsmc_investor_theme&ajax_page_state%5Btheme_token%5D=&ajax_page_state%5Blibraries%5D=addtoany%2Faddtoany.front%2Casset_injector%2Fcss%2Fcreate_new_account%2Casset_injector%2Fjs%2Ffield_date_reverse%2Cbootstrap_barrio%2Fbreadcrumb%2Cbootstrap_barrio%2Fform%2Cbootstrap_barrio%2Fglobal-styling%2Cbootstrap_barrio%2Flinks%2Cbootstrap_barrio%2Fnode%2Cbootstrap_sass%2Ffonts%2Cbootstrap_sass%2Fglobal-styling%2Cbootstrap_sass%2Fgoogle-analytics%2Cclientside_validation_jquery%2Fcv.jquery.ckeditor%2Cclientside_validation_jquery%2Fcv.jquery.validate%2Cclientside_validation_jquery%2Fcv.pattern.method%2Ccore%2Finternal.jquery.form%2Ceu_cookie_compliance%2Feu_cookie_compliance_default%2Cextlink%2Fdrupal.extlink%2Cfontawesome%2Ffontawesome.webfonts%2Cfontawesome%2Ffontawesome.webfonts.shim%2Cgoogle_cse%2FgooglecseWatermark%2Cparagraphs%2Fdrupal.paragraphs.unpublished%2Ctsmc_investor_theme%2Fglobal-styling%2Ctsmc_investor_theme%2Fquarterly-result-library%2Cwebform%2Fwebform.ajax%2Cwebform%2Fwebform.composite%2Cwebform%2Fwebform.dialog%2Cwebform%2Fwebform.element.details.save%2Cwebform%2Fwebform.element.details.toggle%2Cwebform%2Fwebform.element.flexbox%2Cwebform%2Fwebform.element.message%2Cwebform%2Fwebform.element.select%2Cwebform%2Fwebform.form%2Cwebform%2Fwebform.form.submit_once";
http.post(url, body, {
headers: {
"accept": "application/json, text/javascript, */*; q=0.01",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Google Chrome\";v=\"114\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Linux\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
},
})
}
```
## Jmeter
#### command
```
/usr/bin/java --add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.desktop/sun.swing=ALL-UNNAMED --add-opens java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED --add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED -server -XX:+HeapDumpOnOutOfMemoryError -Xms4g -Xmx4g -XX:MaxMetaspaceSize=512m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 -Djava.security.egd=file:/dev/urandom -Duser.language=en -Duser.region=EN -jar ./ApacheJMeter.jar -n -t 123.jmx
```
#### Test - 6 thred groups (3pr+2ir+1www), 6000 in 600 sec, no timeout, 2 loop
```
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan">
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="latest news page">
<intProp name="ThreadGroup.num_threads">6000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">2</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
<stringProp name="HTTPSampler.embedded_url_re">(?i).*pppp.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://pppp.tsmc.com/english/latest-news</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="news page">
<intProp name="ThreadGroup.num_threads">6000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">2</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
<stringProp name="HTTPSampler.embedded_url_re">(?i).*pppp.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://pppp.tsmc.com/english/news/3007</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="event page">
<intProp name="ThreadGroup.num_threads">6000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">2</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
<stringProp name="HTTPSampler.embedded_url_re">(?i).*pppp.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://pppp.tsmc.com/english/events</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="qr page">
<intProp name="ThreadGroup.num_threads">6000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">2</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
<stringProp name="HTTPSampler.embedded_url_re">(?i).*iiii.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://iiii.tsmc.com/english/quarterly-results/2022/q1</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="qr page" enabled="true">
<intProp name="ThreadGroup.num_threads">6000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">2</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
<stringProp name="HTTPSampler.embedded_url_re">(?i).*iiii.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://iiii.tsmc.com/chinese/quarterly-results/2022/q1</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="www page" enabled="true">
<intProp name="ThreadGroup.num_threads">6000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">2</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
<stringProp name="HTTPSampler.embedded_url_re">(?i).*wwww.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://wwww.tsmc.com/english</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>
```
### Test following IR
```
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan">
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="news page" enabled="true">
<intProp name="ThreadGroup.num_threads">800</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">6</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://pppp.tsmc.com/chinese/news/3131</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="qr page" enabled="true">
<intProp name="ThreadGroup.num_threads">800</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">6</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://iiii.tsmc.com/english/quarterly-results/2024/q1</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="qr page" enabled="true">
<intProp name="ThreadGroup.num_threads">800</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">6</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://iiii.tsmc.com/chinese/quarterly-results/2024/q1</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="qr page" enabled="true">
<intProp name="ThreadGroup.num_threads">800</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">6</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://iiii.tsmc.com/chinese/form/qr-audio-webcast-registration</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="qr page" enabled="true">
<intProp name="ThreadGroup.num_threads">800</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">6</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://iiii.tsmc.com/english/form/qr-audio-webcast-registration</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="www page">
<intProp name="ThreadGroup.num_threads">800</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">6</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://wwww.tsmc.com/english</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="www page">
<intProp name="ThreadGroup.num_threads">800</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">6</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://wwww.tsmc.com/chinese</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>
```
### Test - 6 thred groups (3pr+2ir+1www), 1000 in 600 sec, 10 loop, load all embeded resource
```
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan">
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="latest news page">
<intProp name="ThreadGroup.num_threads">1000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">10</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.embedded_url_re">(?i).*pppp.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://pppp.tsmc.com/english/latest-news</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="news page" enabled="true">
<intProp name="ThreadGroup.num_threads">1000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">10</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.embedded_url_re">(?i).*pppp.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://pppp.tsmc.com/english/news/3007</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="event page">
<intProp name="ThreadGroup.num_threads">1000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">10</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.embedded_url_re">(?i).*pppp.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://pppp.tsmc.com/english/events</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="qr page" enabled="true">
<intProp name="ThreadGroup.num_threads">1000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">10</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.embedded_url_re">(?i).*iiii.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://iiii.tsmc.com/english/quarterly-results/2022/q1</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="qr page">
<intProp name="ThreadGroup.num_threads">1000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">10</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.embedded_url_re">(?i).*iiii.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://iiii.tsmc.com/chinese/quarterly-results/2022/q1</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="www page" enabled="true">
<intProp name="ThreadGroup.num_threads">1000</intProp>
<intProp name="ThreadGroup.ramp_time">600</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">10</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
<boolProp name="clearEachIteration">true</boolProp>
<boolProp name="useExpires">false</boolProp>
<boolProp name="CacheManager.controlledByThread">false</boolProp>
</CacheManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<stringProp name="HTTPSampler.embedded_url_re">(?i).*wwww.tsmc.com.*</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">https://wwww.tsmc.com/english</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>
```
#### 20250326stress.js
```
import http from 'k6/http';
import { sleep } from 'k6';
import { parseHTML } from 'k6/html';
import { exec } from 'k6/execution';
const TOTAL_RPS = 30;
function rate(percentage) {
return TOTAL_RPS * percentage;
}
export const options = {
scenarios: {
submitForm: {
exec: 'submitForm',
executor: 'constant-arrival-rate',
duration: '10m',
preAllocatedVUs: 100,
rate: rate(1)
},
// accessIRPage: {
// exec: 'accessIRPage',
// executor: 'constant-arrival-rate',
// duration: '1m',
// preAllocatedVUs: 500,
// rate: rate(10)
// },
// accessPRPage: {
// exec: 'accessPRPage',
// executor: 'constant-arrival-rate',
// duration: '1m',
// preAllocatedVUs: 500,
// rate: rate(10)
// },
// accessWWWPage: {
// exec: 'accessWWWPage',
// executor: 'constant-arrival-rate',
// duration: '10m',
// preAllocatedVUs: 60,
// rate: rate(1)
// },
// physicalRegistration: {
// exec: 'physicalRegistration',
// executor: 'constant-arrival-rate',
// duration: '60s',
// preAllocatedVUs: 20,
// rate: rate(1)
// },
}
};
export function accessIRPage() {
const res_ir_qr = http.get('https://iiiii.tsmc.com/english/quarterly-results');
const res_ir_qr_script = parseHTML(res_ir_qr.body);
res_ir_qr_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://iiiii.tsmc.com" + itemHref);
}
})
const res_ir_qr_en_with_q = http.get('https://iiiii.tsmc.com/english/quarterly-results/2024/q2');
const res_ir_qr_en_with_q_script = parseHTML(res_ir_qr_en_with_q.body);
res_ir_qr_en_with_q_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://iiiii.tsmc.com" + itemHref);
}
})
const res_ir_qr_ch_with_q = http.get('https://iiiii.tsmc.com/chinese/quarterly-results/2024/q2');
const res_ir_qr_ch_with_q_script = parseHTML(res_ir_qr_ch_with_q.body);
res_ir_qr_ch_with_q_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://iiiii.tsmc.com" + itemHref);
}
})
const res_www_home_en = http.get('https://wwwww.tsmc.com/english');
const res_www_home_en_script = parseHTML(res_www_home_en.body);
res_www_home_en_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://wwwww.tsmc.com" + itemHref);
}
})
const res_www_home_ch = http.get('https://wwwww.tsmc.com/chinese');
const res_www_home_ch_script = parseHTML(res_www_home_ch.body);
res_www_home_ch_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://wwwww.tsmc.com" + itemHref);
}
})
sleep(1);
}
export function accessPRPage() {
const res_pr_latest_news = http.get('https://ppppp.tsmc.com/english/latest-news');
const res_pr_latest_news_script = parseHTML(res_pr_latest_news.body);
res_pr_latest_news_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://ppppp.tsmc.com" + itemHref);
}
})
const res_pr_news = http.get('https://ppppp.tsmc.com/english/news/3134');
const res_pr_news_script = parseHTML(res_pr_news.body);
res_pr_news_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://ppppp.tsmc.com" + itemHref);
}
})
sleep(1);
}
export function accessWWWPage() {
const res_www_home_en = http.get('https://wwwww.tsmc.com/english/node/235');
const res_www_home_en_script = parseHTML(res_www_home_en.body);
res_www_home_en_script.find('link').toArray().forEach(function (item) {
const itemHref = item.attr('href');
// console.log(itemHref);
if (!itemHref.startsWith("http")) {
http.get("https://wwwww.tsmc.com" + itemHref);
}
})
// const res_www_home_ch = http.get('https://wwwww.tsmc.com/chinese');
// const res_www_home_ch_script = parseHTML(res_www_home_ch.body);
// res_www_home_ch_script.find('link').toArray().forEach(function (item) {
// const itemHref = item.attr('href');
// // console.log(itemHref);
// if (!itemHref.startsWith("http")) {
// http.get("https://wwwww.tsmc.com" + itemHref);
// }
// })
sleep(1);
}
export function submitForm() {
const url = "https://wwwww.tsmc.com/english/node/235";
const body = "name%5Bfirst%5D=test&name%5Blast%5D=test&email=test%400321.tsmc.com&company_organization=tsmc&primary_job=Investor+-+Chief+Investment+Officer&op=SEND&form_build_id=form-72sMIKwuTz4j0Gs6Vki6Gy4VDIcsE44GxBRRxxTpqX4&form_id=webform_submission_general_node_235_add_form&business-name=";
http.post(url, body, {
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"accept-language": "zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7",
"cache-control": "no-cache",
"content-type": "application/x-www-form-urlencoded",
"pragma": "no-cache",
"priority": "u=0, i",
"sec-ch-ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Google Chrome\";v=\"126\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Linux\"",
"sec-fetch-dest": "document",
"sec-fetch-mode": "navigate",
"sec-fetch-site": "same-origin",
"sec-fetch-user": "?1",
"upgrade-insecure-requests": "1"
}});
}
export function physicalRegistration(){
const url = "https://iiiii.tsmc.com/english/form/qr-physical-conference.2024Q2?_webform_dialog=1&_wrapper_format=drupal_modal&ajax_form=1&_wrapper_format=drupal_ajax"
// const randomStringForMail = randomString(5);
const body = "name%5Bfirst%5D=test&name%5Blast%5D=test&email=k6%40testfor300w"+Date.now()+".com&company_organization=test&primary_job=Investor+-+Portfolio%2FFund+Manager&job_title=test&telephone=09123456789&country=Austria&year_and_quarter=2024Q2&venue=Shangri-La+Far+Eastern%2C+Taipei%2C+3F+Grand+Ballroom&address=201+Tun+Hwa+South+Road%2C+Section+2%2C+Taipei+10675+Taiwan&date=2024-07-18+14%3A00%3A00&event_title=Attend+in+person+(Registration+deadline+is+5%3A00+pm%2C+July+17%2C+2024%2C+Taiwan+time)+&form_build_id=form-bh_riaHlPSS0xPBqhLnLI76PBlVYmn_1ZvYHWJMa2Ns&form_id=webform_submission_qr_physical_conference.2024Q2_add_form&_triggering_element_name=op&_triggering_element_value=SEND&_drupal_ajax=1&ajax_page_state%5Btheme%5D=tsmc_investor_theme&ajax_page_state%5Btheme_token%5D=&ajax_page_state%5Blibraries%5D=addtoany%2Faddtoany.front%2Casset_injector%2Fcss%2Fcreate_new_account%2Casset_injector%2Fjs%2Ffield_date_reverse%2Cbootstrap_barrio%2Fbreadcrumb%2Cbootstrap_barrio%2Fform%2Cbootstrap_barrio%2Fglobal-styling%2Cbootstrap_barrio%2Flinks%2Cbootstrap_barrio%2Fnode%2Cbootstrap_sass%2Ffonts%2Cbootstrap_sass%2Fglobal-styling%2Cbootstrap_sass%2Fgoogle-analytics%2Cclientside_validation_jquery%2Fcv.jquery.ckeditor%2Cclientside_validation_jquery%2Fcv.jquery.validate%2Cclientside_validation_jquery%2Fcv.pattern.method%2Ccore%2Finternal.jquery.form%2Ceu_cookie_compliance%2Feu_cookie_compliance_default%2Cextlink%2Fdrupal.extlink%2Cfontawesome%2Ffontawesome.webfonts%2Cfontawesome%2Ffontawesome.webfonts.shim%2Cgoogle_cse%2FgooglecseWatermark%2Cparagraphs%2Fdrupal.paragraphs.unpublished%2Ctsmc_investor_theme%2Fglobal-styling%2Ctsmc_investor_theme%2Fquarterly-result-library%2Cwebform%2Fwebform.ajax%2Cwebform%2Fwebform.composite%2Cwebform%2Fwebform.dialog%2Cwebform%2Fwebform.element.details.save%2Cwebform%2Fwebform.element.details.toggle%2Cwebform%2Fwebform.element.flexbox%2Cwebform%2Fwebform.element.message%2Cwebform%2Fwebform.element.select%2Cwebform%2Fwebform.form%2Cwebform%2Fwebform.form.submit_once";
http.post(url, body, {
headers: {
"accept": "application/json, text/javascript, */*; q=0.01",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Google Chrome\";v=\"114\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Linux\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
},
})
}
```