Skip to content

Instantly share code, notes, and snippets.

View QAInsights's full-sized avatar
💻
Breaking Stuffs

NaveenKumar Namachivayam ⚡ QAInsights

💻
Breaking Stuffs
View GitHub Profile
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
@QAInsights
QAInsights / dynamodb.local
Last active February 13, 2023 23:02
AWS DynamoDB Local Instructions
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`
@QAInsights
QAInsights / ChatGPT-sample-raw-data.csv
Created January 17, 2023 15:11
Sample raw data for ChatGPT
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 17 columns, instead of 3. in line 9.
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
@QAInsights
QAInsights / .zshrc
Created July 28, 2022 14:17 — forked from Anon-Exploiter/.zshrc
.zshrc of Kali Linux 2020.3 including the lit prompt
# ~/.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
@QAInsights
QAInsights / nginx-tuning.md
Created April 5, 2022 16:00 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

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" ]
}
}
/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\