first install eza by homebrew
brew install eza| import http from 'k6/http'; | |
| import { check } from 'k6'; | |
| export const options = { | |
| vus: 1, | |
| duration: '300s', | |
| noConnectionReuse: false, | |
| batchPerHost: 20, | |
| }; |
| import org.apache.http.client.methods.HttpGet | |
| import org.apache.http.impl.client.CloseableHttpClient | |
| import org.apache.http.impl.client.HttpClients | |
| import org.apache.http.impl.conn.PoolingHttpClientConnectionManager | |
| import org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy | |
| import org.apache.http.util.EntityUtils | |
| // Define the desired number of connections | |
| def maxConnectionsPerRoute = 1 |
| Download DynamoDB Local https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html | |
| Launch in Windows | |
| `java -D"java.library.path=./DynamoDBLocal_lib" -jar DynamoDBLocal.jar` | |
| Create table | |
| `aws dynamodb create-table --table-name perfgpt_dev --attribute-definitions AttributeName=username,AttributeType=S AttributeName=datetime,AttributeType=S --key-schema AttributeName=username,KeyType=HASH AttributeName=datetime,KeyType=RANGE --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5` |
| timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect | |
| 1673958946553,95,HTTP Request,200,OK,Thread Group 1-1,text,true,,1591,109,1,1,http://example.com/,92,0,56 | |
| 1673958946969,45,HTTP Request,200,OK,Thread Group 1-2,text,true,,1591,109,2,2,http://example.com/,45,0,17 | |
| 1673958947719,28,HTTP Request,200,OK,Thread Group 1-1,text,true,,1591,109,2,2,http://example.com/,28,0,0 | |
| 1673958948053,27,HTTP Request,200,OK,Thread Group 1-2,text,true,,1591,109,2,2,http://example.com/,27,0,0 | |
| 1673958948827,27,HTTP Request,200,OK,Thread Group 1-1,text,true,,1591,109,2,2,http://example.com/,27,0,0 | |
| 1673958949095,27,HTTP Request,200,OK,Thread Group 1-2,text,true,,1591,109,2,2,http://example.com/,26,0,0 | |
| 1673958949905,25,HTTP Request,503,OK,Thread Group 1-1,text,true,,1591,109,2,2,http://example.com/,25,0,0 | |
| 1673958950185,26,HTTP Request,503,OK,Thread Group 1-2,text,true,,1591,109,2,2,http://example.com/,26,0,0 | |
| 1673958951018,26,HT |
| # ~/.zshrc file for zsh non-login shells. | |
| # see /usr/share/doc/zsh/examples/zshrc for examples | |
| setopt autocd # change directory just by typing its name | |
| #setopt correct # auto correct mistakes | |
| setopt interactivecomments # allow comments in interactive mode | |
| setopt ksharrays # arrays start at 0 | |
| setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’ | |
| setopt nonomatch # hide error message if there is no match for the pattern | |
| setopt notify # report the status of background jobs immediately |
| # Method 1 | |
| npm install @openapitools/openapi-generator-cli -g | |
| openapi-generator-cli help | |
| openapi-generator-cli version | |
| openapi-generator-cli generate -g jmeter -i http://localhost:9966/petclinic/v2/api-docs |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
| { | |
| "aspnew" : { | |
| "versions" : [ "1.0" ] | |
| } | |
| } |