apache benchmark gnuplot

Gnuplot ile Apache Benchmark Değerlerini Grafik Haline Getirmek

Ben testlerimde kali linux kullanmayı tercih ediyorum , debian tabanlı olması işimi de kolaylaştırıyor. Gnuplot eğer kullandığınız dağıtımda yok ise apt-get install gnuplot şeklinde kurulum yapabilirsiniz.

Şimdi örneğimizde bir siteye ab test yapacağız , Aşağıdaki komut baz alındığında açıklaması kısaca şöyle , ben ayhanarda.com a doğru eş zamanlı 10 istek şeklinde toplam 500 istek göndereceğim. Sonucunu da ardatest.data dosyasına yazacağım. (tabi Siz benim siteme doğru test yapmayın lütfen 🙂

root@ayhanarda-kali:~# ab -n 500 -c 10 -g ardatest.data http://www.ayhanarda.com/
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.ayhanarda.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Finished 500 requests
Server Software: LiteSpeed
Server Hostname: www.ayhanarda.com
Server Port: 80

Document Path: /
Document Length: 1147 bytes

Concurrency Level: 10
Time taken for tests: 2.158 seconds
Complete requests: 500
Failed requests: 0
Non-2xx responses: 500
Total transferred: 683500 bytes
HTML transferred: 573500 bytes
Requests per second: 231.65 [#/sec] (mean)
Time per request: 43.169 [ms] (mean)
Time per request: 4.317 [ms] (mean, across all concurrent requests)
Transfer rate: 309.24 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 15 17 1.8 18 25
Processing: 18 25 15.6 21 132
Waiting: 18 25 13.9 21 113
Total: 33 43 15.7 39 150

Percentage of the requests served within a certain time (ms)
50% 39
66% 41
75% 43
80% 45
90% 51
95% 55
98% 128
99% 147
100% 150 (longest request)

Muhtemelen komut sonunda buna benzer bir çıktı alacaksınız , anlamlandırması karşışık olduğu için grafik üretmeyi tercih ediyoruz.

Şimdi favori editor ünüz ile apache-benchmark.p isimli dosyayı aşağıdaki örnekteki gibi düzenleyeceğiz. Muhtemel apache benchmark testi yapan birisi zaten kolaylıkla anlamlandırabilecektir. set output ile oluşacak png dosyasının adını belirliyoruz ,satır ve sütun a isim veriyoruz , hangi apachebenchmark çıktı dosyasını kullanacağımızı belirtiyoruz , herşey tamam ise kaydedip çıkıyoruz.

root@ayhanarda-kali:~# nano apache-benchmark.p

# output as png image
set terminal png

# save file to “benchmark.png”
set output “benchmark.png”

# graph title
set title “ab -n 500 -c 10 -g ardatest.data http://www.ayhanarda.com/”

#nicer aspect ratio for image size
set size 1,0.7

# y-axis grid
set grid y

#x-axis label
set xlabel “istek”

#y-axis label
set ylabel “yanit suresi (ms)”

plot “ardatest.data” using 9 smooth sbezier with lines title “something”
#Ayhan ARDA – Apache Benchmark


Aşağıdaki komut ile grafiğimizi oluşturabiliriz.

root@ayhanarda-kali:~# gnuplot apache-benchmark.p

Şimdi benchmark.png dosyamız hazır , benim örneğimde aşağıdaki gibi oluştu.

apache benchmark gnuplot

Ayhan ARDA

Share Button

Yayımlandı

kategorisi

yazarı:

Yorumlar

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Bu site, istenmeyenleri azaltmak için Akismet kullanıyor. Yorum verilerinizin nasıl işlendiği hakkında daha fazla bilgi edinin.