Skip to content

Instantly share code, notes, and snippets.

View kevinohashi's full-sized avatar

Kevin Ohashi kevinohashi

View GitHub Profile
@kevinohashi
kevinohashi / loadimpact_wp_hosting_performance_benchmarks_test.lua
Created May 30, 2020 15:28
Review SignalWordPress Hosting Performance Benchmarks Load Impact Test Script
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
@kevinohashi
kevinohashi / gist:017c4489756b357ba68e93151879a449
Created July 25, 2019 00:52
benchmark nginx vs lsws - linode 1gb instance
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
@kevinohashi
kevinohashi / list of us states and countries with same 2 letter code.txt
Created February 13, 2018 09:29
list of US states and countries with same 2 letter code
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
@kevinohashi
kevinohashi / gist:fd801b4904370541f321
Created September 24, 2015 20:01
WPPerformanceTester $wpdb test
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;
#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