Ayhan ARDA

Gnuplot ile Apache Benchmark Değerlerini Grafik Haline Getirmek

<p>Ben testlerimde kali linux kullanmay&inodot; tercih ediyorum &comma; debian tabanl&inodot; olmas&inodot; i&scedil;imi de kolayla&scedil;t&inodot;r&inodot;yor&period; Gnuplot e&gbreve;er kulland&inodot;&gbreve;&inodot;n&inodot;z da&gbreve;&inodot;t&inodot;mda yok ise <span style&equals;"color&colon; &num;ff0000&semi;">apt-get install gnuplot<&sol;span> &scedil;eklinde kurulum yapabilirsiniz&period;<&sol;p>&NewLine;<p>&Scedil;imdi örne&gbreve;imizde bir siteye ab test yapaca&gbreve;&inodot;z &comma; A&scedil;a&gbreve;&inodot;daki komut baz al&inodot;nd&inodot;&gbreve;&inodot;nda aç&inodot;klamas&inodot; k&inodot;saca &scedil;öyle &comma; ben ayhanarda&period;com a do&gbreve;ru e&scedil; zamanl&inodot; 10 istek &scedil;eklinde toplam 500 istek gönderece&gbreve;im&period; Sonucunu da ardatest&period;data dosyas&inodot;na yazaca&gbreve;&inodot;m&period; &lpar;tabi Siz benim siteme do&gbreve;ru test yapmay&inodot;n lütfen &colon;&rpar;<&sol;p>&NewLine;<p>root&commat;ayhanarda-kali&colon;~&num; <span style&equals;"color&colon; &num;ff0000&semi;">ab -n 500 -c 10 -g ardatest&period;data http&colon;&sol;&sol;www&period;ayhanarda&period;com&sol;<&sol;span><br &sol;>&NewLine;This is ApacheBench&comma; Version 2&period;3 &lt&semi;&dollar;Revision&colon; 1604373 &dollar;&gt&semi;<br &sol;>&NewLine;Copyright 1996 Adam Twiss&comma; Zeus Technology Ltd&comma; http&colon;&sol;&sol;www&period;zeustech&period;net&sol;<br &sol;>&NewLine;Licensed to The Apache Software Foundation&comma; http&colon;&sol;&sol;www&period;apache&period;org&sol;<&sol;p>&NewLine;<p>Benchmarking www&period;ayhanarda&period;com &lpar;be patient&rpar;<br &sol;>&NewLine;Completed 100 requests<br &sol;>&NewLine;Completed 200 requests<br &sol;>&NewLine;Completed 300 requests<br &sol;>&NewLine;Completed 400 requests<br &sol;>&NewLine;Completed 500 requests<br &sol;>&NewLine;Finished 500 requests<br &sol;>&NewLine;Server Software&colon; LiteSpeed<br &sol;>&NewLine;Server Hostname&colon; www&period;ayhanarda&period;com<br &sol;>&NewLine;Server Port&colon; 80<&sol;p>&NewLine;<p><&excl;--more--><&sol;p>&NewLine;<p>Document Path&colon; &sol;<br &sol;>&NewLine;Document Length&colon; 1147 bytes<&sol;p>&NewLine;<p>Concurrency Level&colon; 10<br &sol;>&NewLine;Time taken for tests&colon; 2&period;158 seconds<br &sol;>&NewLine;Complete requests&colon; 500<br &sol;>&NewLine;Failed requests&colon; 0<br &sol;>&NewLine;Non-2xx responses&colon; 500<br &sol;>&NewLine;Total transferred&colon; 683500 bytes<br &sol;>&NewLine;HTML transferred&colon; 573500 bytes<br &sol;>&NewLine;Requests per second&colon; 231&period;65 &lbrack;&num;&sol;sec&rsqb; &lpar;mean&rpar;<br &sol;>&NewLine;Time per request&colon; 43&period;169 &lbrack;ms&rsqb; &lpar;mean&rpar;<br &sol;>&NewLine;Time per request&colon; 4&period;317 &lbrack;ms&rsqb; &lpar;mean&comma; across all concurrent requests&rpar;<br &sol;>&NewLine;Transfer rate&colon; 309&period;24 &lbrack;Kbytes&sol;sec&rsqb; received<&sol;p>&NewLine;<p>Connection Times &lpar;ms&rpar;<br &sol;>&NewLine;min mean&lbrack;&plus;&sol;-sd&rsqb; median max<br &sol;>&NewLine;Connect&colon; 15 17 1&period;8 18 25<br &sol;>&NewLine;Processing&colon; 18 25 15&period;6 21 132<br &sol;>&NewLine;Waiting&colon; 18 25 13&period;9 21 113<br &sol;>&NewLine;Total&colon; 33 43 15&period;7 39 150<&sol;p>&NewLine;<p>Percentage of the requests served within a certain time &lpar;ms&rpar;<br &sol;>&NewLine;50&percnt; 39<br &sol;>&NewLine;66&percnt; 41<br &sol;>&NewLine;75&percnt; 43<br &sol;>&NewLine;80&percnt; 45<br &sol;>&NewLine;90&percnt; 51<br &sol;>&NewLine;95&percnt; 55<br &sol;>&NewLine;98&percnt; 128<br &sol;>&NewLine;99&percnt; 147<br &sol;>&NewLine;100&percnt; 150 &lpar;longest request&rpar;<&sol;p>&NewLine;<p>Muhtemelen komut sonunda buna benzer bir ç&inodot;kt&inodot; alacaks&inodot;n&inodot;z &comma; anlamland&inodot;rmas&inodot; kar&scedil;&inodot;&scedil;&inodot;k oldu&gbreve;u için grafik üretmeyi tercih ediyoruz&period;<&sol;p>&NewLine;<p>&Scedil;imdi favori editor ünüz ile apache-benchmark&period;p isimli dosyay&inodot; a&scedil;a&gbreve;&inodot;daki örnekteki gibi düzenleyece&gbreve;iz&period; Muhtemel apache benchmark testi yapan birisi zaten kolayl&inodot;kla anlamland&inodot;rabilecektir&period; set output ile olu&scedil;acak png dosyas&inodot;n&inodot;n ad&inodot;n&inodot; belirliyoruz &comma;sat&inodot;r ve sütun a isim veriyoruz &comma; hangi apachebenchmark ç&inodot;kt&inodot; dosyas&inodot;n&inodot; kullanaca&gbreve;&inodot;m&inodot;z&inodot; belirtiyoruz &comma; her&scedil;ey tamam ise kaydedip ç&inodot;k&inodot;yoruz&period;<&sol;p>&NewLine;<p>root&commat;ayhanarda-kali&colon;~&num; <span style&equals;"color&colon; &num;ff0000&semi;">nano apache-benchmark&period;p<&sol;span><&sol;p>&NewLine;<p>&num; output as png image<br &sol;>&NewLine;set terminal png<&sol;p>&NewLine;<p>&num; save file to &&num;8220&semi;benchmark&period;png&&num;8221&semi;<br &sol;>&NewLine;set output &&num;8220&semi;benchmark&period;png&&num;8221&semi;<&sol;p>&NewLine;<p>&num; graph title<br &sol;>&NewLine;set title &&num;8220&semi;ab -n 500 -c 10 -g ardatest&period;data http&colon;&sol;&sol;www&period;ayhanarda&period;com&sol;&&num;8221&semi;<&sol;p>&NewLine;<p>&num;nicer aspect ratio for image size<br &sol;>&NewLine;set size 1&comma;0&period;7<&sol;p>&NewLine;<p>&num; y-axis grid<br &sol;>&NewLine;set grid y<&sol;p>&NewLine;<p>&num;x-axis label<br &sol;>&NewLine;set xlabel &&num;8220&semi;istek&&num;8221&semi;<&sol;p>&NewLine;<p>&num;y-axis label<br &sol;>&NewLine;set ylabel &&num;8220&semi;yanit suresi &lpar;ms&rpar;&&num;8221&semi;<&sol;p>&NewLine;<p>plot &&num;8220&semi;ardatest&period;data&&num;8221&semi; using 9 smooth sbezier with lines title &&num;8220&semi;something&&num;8221&semi;<br &sol;>&NewLine;&num;Ayhan ARDA &&num;8211&semi; Apache Benchmark<&sol;p>&NewLine;<hr &sol;>&NewLine;<p>A&scedil;a&gbreve;&inodot;daki komut ile grafi&gbreve;imizi olu&scedil;turabiliriz&period;<&sol;p>&NewLine;<p>root&commat;ayhanarda-kali&colon;~&num; <span style&equals;"color&colon; &num;ff0000&semi;">gnuplot apache-benchmark&period;p<&sol;span><&sol;p>&NewLine;<p>&Scedil;imdi benchmark&period;png dosyam&inodot;z haz&inodot;r &comma; benim örne&gbreve;imde a&scedil;a&gbreve;&inodot;daki gibi olu&scedil;tu&period;<&sol;p>&NewLine;<p><a href&equals;"http&colon;&sol;&sol;www&period;ayhanarda&period;com&sol;blog&sol;wp-content&sol;uploads&sol;2016&sol;08&sol;benchmark-e1470209387803&period;png"><img class&equals;"aligncenter size-full wp-image-1116" src&equals;"http&colon;&sol;&sol;www&period;ayhanarda&period;com&sol;blog&sol;wp-content&sol;uploads&sol;2016&sol;08&sol;benchmark-e1470209387803&period;png" alt&equals;"apache benchmark gnuplot" width&equals;"622" height&equals;"331" &sol;><&sol;a><&sol;p>&NewLine;<p>Ayhan ARDA<&sol;p>&NewLine;&NewLine;

Exit mobile version