Posts

Showing posts from December, 2017

Non GUI mode testing in Jmeter

-n – non-GUI mode – this specifies JMeter is to run in non-GUI mode -t – JMX file – location of the test plan and the name of JMX file that contains the Test Plan -l – log file name of JTL file to log sample results to jmeter -n -t my_test_plan.jmx -l log.jtl Shutdown - graceful shutdown StopTestNow - immediate shutdown

List of stat reports in Linux

sar -n DEV 3 1200 > network & mpstat -P ALL 3 1200 > mpstat_all & mpstat 3 1200 > mpstat & sat -A 3 1200 >sarall & iostat ALL 3 1200 > iostat_all & vmstat 3 1200 > vmstat &

How to take thread dump in linux system

-> Get process id by using following command ps -eaf | grep java /usr/java/jdk1.5x/bin/jstack -l  1234(process id]) > outputTD1 Or run the following script rpid = `ps -eaf |grep nextgen| grep jboss-20|awk '{print $2}'` for i in 1 2 3 4 5 6 7 8 9 10 do mkdir TD$i cd TD$i for j in 1 2 3 4 5 6 7 8 9 10 do ps -mo pid,lwp,stime,time,pcpu -c java> PSrec$i_$j.out /usr/java/jdk1.7.x/bin/jstack -l $ rpid > outputTD$j sleep 3 done sleep 300 cd ../ done

Bean Shell sampler With Example

Image
String line = "quick, brown, fox, jumped, over"; String[] words = line.split(","); for (int i = 0; i < words.length; i++) {   log.info(words[i]);   if (i == 2) {       log.info("Third word is: " + words[2]);       } } String str= "ram"; String str2="raj"; String str3; log.info(words[2]+"concat"+words[3]); str3= words[2].concat(words[3]); //log.info(); log.info(str+str2); vars.put("REF_NAME",str3); Logs : ----- 13:42:21,452 INFO o.a.j.e.StandardJMeterEngine: Running the test! , 13:42:21,453 INFO o.a.j.s.SampleEvent: List of sample_variables: [] , 13:42:21,454 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*) , 13:42:21,613 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group , 13:42:21,613 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group. , 13:42:21,613 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error , 13:4...

Performance Bottlenecks

Image
What is a performance bottleneck? Performance bottleneck can be anything and it is an impediment to the system performance. Let us think software system as a 3-lane highway. During the off-peak hours, vehicles can go as fast as possible since almost all the lanes are empty. How about the peak hours when all the lanes are fully occupied? Of course, cars need to slow down and may even go bumper to bumper. Why is it so? Once the highway reaches the limit of vehicles it can handle, it will to force the vehicles to slow down due to queuing. So, the capacity of the highway is a bottleneck here. It is pretty much the same scenario with the software. Your highway capacity is similar to your CPU capacity in the software. When CPU is full and busy serving the request, it cannot take any more requests and everything else will slow down. Let us assume that there is a road work happening in the highway and one lane is closed. Obviously, highway will reach its capacity earlier than expected. W...

Relation Between Throughput and Response time

Throughput= The amount of data coming from the server per  sec in bytes for the request. Response time= The total time between client to server and  then server to client is called Response time. Throughput is the no:of bytes downloaded from the server during a transaction, whereas response time is the time taken for a transaction to complete. Until the total bytes gets downloaded from the server, we cannot consider the transaction is completed. So throughput should be inversely  proportional to response time.  Means if throughput (no. Of bytes increas) response time decrease.  Suppose for a login transaction, if 10240 bytes gets downloaded from the server. User has to wait until all bytes gets downloaded to consider the transaction is completed.  With 1 user load 10240 bytes may get downloaded in 2 sec With 100 concurrent user load it may take more than 2 sec (say 60 sec) to download same 10240 * 100 bytes.