grafana / awesome-k6 Goto Github PK
View Code? Open in Web Editor NEWA curated list of awesome tools, content and projects using k6
License: Creative Commons Zero v1.0 Universal
A curated list of awesome tools, content and projects using k6
License: Creative Commons Zero v1.0 Universal
It is usual for awesome lists that although the list is longer, the list directly contains links to resources. In addition to the GitHub topic search (xk6), it is advisable to add a list of popular extensions.
Extensions supported by Grafana and supported by the community should be placed in separate sections. The list of community-supported extensions should initially contain those registered extensions whose repository has ten or more stars. Later, this list will be maintained by the community (in the form of PRs).
The following video, as mentioned in the readme is unavailable.
Please share the following video resource to learn k6 and Azure as a newbie.
Performance testing: from zero to hero with k6 & Azure - Jose Luis Latorre Millas at Cloud Summit 2021.
http_req_duration number is not correct.Because I have totally 43 request. But duration is 1,193 s .1s is too low for sending+waiting+receiving requests for total 43 request.
### My result is is below;
scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop):
* CreatePicking: 1 iterations for each of 1 VUs (maxDuration: 10m0s, exec: CreatePicking, gracefulStop: 30s)
running (00m44.2s), 0/1 VUs, 1 complete and 0 interrupted iterations
CreatePicking ✓ [======================================] 1 VUs 00m23.3s/10m0s 1/1 iters, 1 per VU
INFO[0046] [k6-reporter v2.3.0] Generating HTML summary report source=console
█ setup
█ Picking load test senaryosu çalıştırır
✓ 204 is 204
total_count...: avg=23275 min=23275 med=23275 max=23275 p(90)=23275 p(95)=23275
checks................................................: 100.00% ✓ 1 ✗ 0
data_received.........................................: 41 kB 938 B/s
data_sent.............................................: 175 kB 4.0 kB/s
group_duration........................................: avg=23275.72ms min=23275.72ms med=23275.72ms max=23275.72ms p(90)=23275.72ms p(95)=23275.72ms
http_req_blocked......................................: avg=19.86ms min=0.00ms med=0.00ms max=382.91ms p(90)=0.00ms p(95)=197.05ms
http_req_connecting...................................: avg=5.06ms min=0.00ms med=0.00ms max=86.96ms p(90)=0.00ms p(95)=53.43ms
http_req_duration.....................................: avg=1005.63ms min=148.90ms med=532.32ms max=18206.84ms p(90)=1193.57ms p(95)=1408.60ms
{ expected_response:true }..........................: avg=1005.63ms min=148.90ms med=532.32ms max=18206.84ms p(90)=1193.57ms p(95)=1408.60ms
http_req_failed.......................................: 0.00% ✓ 0 ✗ 43
http_req_receiving....................................: avg=0.20ms min=0.00ms med=0.00ms max=3.24ms p(90)=0.59ms p(95)=0.96ms
http_req_sending......................................: avg=0.13ms min=0.00ms med=0.00ms max=0.58ms p(90)=0.51ms p(95)=0.55ms
http_req_tls_handshaking..............................: avg=8.56ms min=0.00ms med=0.00ms max=165.03ms p(90)=0.00ms p(95)=67.28ms
http_req_waiting......................................: avg=1005.31ms min=148.40ms med=532.17ms max=18206.84ms p(90)=1193.54ms p(95)=1408.58ms
http_reqs.............................................: 43 0.973519/s
iteration_duration....................................: avg=22078.97ms min=20882.21ms med=22078.97ms max=23275.72ms p(90)=23036.37ms p(95)=23156.05ms
iterations............................................: 1 0.02264/s
vus...................................................: 1 min=0 max=1
vus_max...............................................: 1 min=1 max=1
### My code is below;
`
import http from 'k6/http'
import { describe } from 'https://jslib.k6.io/expect/0.0.4/index.js';
import exec from 'k6/execution';
import { Trend } from 'k6/metrics';
import { htmlReport } from "https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js";
import { textSummary } from 'https://jslib.k6.io/k6-summary/0.0.1/index.js';
let totalPickingTimeTrend = new Trend('total_count');
let authUrl = 'test';
let requestUrlAPI = 'test';
let requestUrlSeed = 'test';
let tokenPayload = {
client_id: "test",
}
export function setup() {
let createPickingStartedSalesOrdersHeader = {
headers: {
"apikey": "test",
"Content-Type": "application/json"
},
};
let createPickingStartedSalesOrdersRes = http.post(requestUrlSeed + 'tester', JSON.stringify({
salesOrderConfigurations: [
{
amount: 100
}
],
tenant: 'test',
operation: 'test'
}), createPickingStartedSalesOrdersHeader)
let response = http.post(authUrl, tokenPayload);
return [response.json(), createPickingStartedSalesOrdersRes.json()]
}
export function handleSummary(data) {
return {
"result.html": htmlReport(data),
stdout: textSummary(data, { indent: " ", enableColors: true }),
}
}
export const options = {
summaryTimeUnit: 'ms',
scenarios: {
CreatePicking: {
exec: 'CreatePicking',
executor: 'per-vu-iterations',
vus: 1,
iterations: 1
}
}
}
export function CreatePicking(data) {
let generateTokenHeader = {
headers: {
'Authorization': `Bearer ${data[0].access_token}`,
'content-type': 'application/json',
},
};
describe('Picking load test senaryosu çalıştırır', (t) => {
let startTime = Date.now();
//if exist
let continueIfExistRes = http.post(requestUrlAPI + 'test1', JSON.stringify({
label: `${data[1][exec.vu.idInTest - 1]}`
}), generateTokenHeader
)
let pickingProcessReferenceNumber = continueIfExistRes.json().route.pickingProcessReferenceNumber;
let createdIsCompleted = continueIfExistRes.json().route.isCompleted;
while (createdIsCompleted == false) {
//check
http.post(requestUrlAPI + 'test2', JSON.stringify({
pickingReferenceNumber: `${pickingProcessReferenceNumber}`,
}), generateTokenHeader)
//control
http.post(requestUrlAPI + 'test3', JSON.stringify({
pickingReferenceNumber: `${pickingProcessReferenceNumber}`,
}), generateTokenHeader)
//place
let placeProductRes = http.post(requestUrlAPI + 'test4', JSON.stringify({
pickingReferenceNumber: `${pickingProcessReferenceNumber}`,
}), generateTokenHeader)
pickingProcessReferenceNumber = placeProductRes.json().pickingProcessReferenceNumber;
createdIsCompleted = placeProductRes.json().isCompleted;
}
//complete
let completePickingCompleteProcessRes = http.post(requestUrlAPI + 'test5', JSON.stringify({
pickingReferenceNumber: `${pickingProcessReferenceNumber}`,
placeTrolleyAddressLabel: "PA",
}), generateTokenHeader)
t.expect(completePickingCompleteProcessRes.status).toEqual(204);
let totalTime = Date.now() - startTime
totalPickingTimeTrend.add(totalTime)
});
}
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.