This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Sets up default LEMP Stack on Ubuntu (14.04x64) with Nginx, MySql 5.5, PHP-FPM 5.5 | |
#CONFIGURATION | |
MYSQLPASS="password" | |
MYSQLDATABASE="wordpress" | |
SERVERNAMEORIP="example.com" | |
#update everything | |
apt-get update | |
#install php, mysql, nginx | |
apt-get -y install nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_wordpress(){ | |
//create dummy text to insert into database | |
$dummytextseed = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sollicitudin iaculis libero id pellentesque. Donec sodales nunc id lorem rutrum molestie. Duis ac ornare diam. In hac habitasse platea dictumst. Donec nec mi ipsum. Aenean dictum imperdiet erat, at lacinia mi ultrices ut. Phasellus quis nibh ornare, pulvinar dui sit amet, venenatis arcu. Suspendisse eget vehicula ligula, et placerat sapien. Cras enim erat, scelerisque sit amet tellus vel, tempor venenatis risus. In ultricies tristique ante, eu lobortis leo. Cras ullamcorper eleifend libero, quis sollicitudin massa venenatis a. Vestibulum sed pellentesque urna, nec consectetur nulla. Vestibulum sodales purus metus, non scelerisque."; | |
$dummytext = ""; | |
for($x=0; $x<100; $x++){ | |
$dummytext .= str_shuffle($dummytextseed); | |
} | |
//start timing wordpress mysql functions | |
$time_start = microtime(true); | |
global $wpdb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
al Alabama Albania | |
az Arizona Azerbaijan | |
ca California Canada | |
co Colorado Colombia | |
de Delaware Germany | |
ga Georgia Gabon | |
id Idaho Indonesia | |
il Illinois Israel | |
in Indiana India | |
ky Kentucky Cayman Islands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h2load - 1kstatic.html | |
lsws 5.4 finished in 0.76 seconds, 132261.00 req/s, 15.53 MB/s, 0 failures | |
nginx 1.16.0 finished in 4.40 seconds, 22710.60 req/s, 5.07 MB/s, 0 failures | |
wrk - 1kstatic.html | |
lsws 5.4 finished in 5.00 seconds, 60256.80 req/s, 22.76 MB/s, N/A failures | |
nginx 1.16.0 finished in 5.00 seconds, 18618.40 req/s, 6.75 MB/s, N/A failures | |
h2load - 1knogzip.jpg | |
lsws 5.4 finished in 62.05 seconds, 1595.50 req/s, 1.60 MB/s, 1000 failures | |
nginx 1.16.0 finished in 3.10 seconds, 32253.60 req/s, 35.44 MB/s, 0 failures | |
wrk - 1knogzip.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http.page_start("Page 1 Blitz") | |
responses = http.request_batch({ | |
{"GET", "<url>", auto_decompress=true, response_body_bytes=1024} | |
}) | |
if responses[1].status_code == 200 then else log.debug("Status: " .. responses[1].status_code) end |