Skip to content

Instantly share code, notes, and snippets.

@IamTechknow
IamTechknow / loader_gist.txt
Last active November 30, 2018 03:00
Loader.io setup and results
EC2 setup:
One instance for the proxy
One instance for both the database and server
Note: I'm enumerating out the form options in the test setting page and summary page
Test settings:
Name: Proxy 1500 RPS
@IamTechknow
IamTechknow / httperf_ec2_test.txt
Created November 28, 2018 00:00
Isolated stress test of EC2 hosted service
Command: httperf --server=localhost --port=80 --uri=/MTAwMDAwMA== --num-conns=60000 --rate 200
Output:
ubuntu@ip-172-31-28-141:~$ httperf --server=localhost --port=80 --uri=/MTAwMDAwMA== --num-conns=60000 --rate 200
httperf --client=0/1 --server=localhost --port=80 --uri=/MTAwMDAwMA== --rate=200 --send-buffer=4096 --recv-buffer=16384 --num-conns=60000 --num-calls=1
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
Maximum connect burst length: 9
Total: connections 60000 requests 60000 replies 60000 test-duration 300.003 s
@IamTechknow
IamTechknow / k6_proxy_test.txt
Last active November 25, 2018 00:54
Stress test of local proxy server
Stress test results:
npm run stress
> k6 run server/k6_test.js
/\ |‾‾| /‾‾/ /‾/
/\ / \ | |_/ / / /
/ \/ \ | | / ‾‾\
/ \ | |‾\ \ | (_) |
@IamTechknow
IamTechknow / k6_test.txt
Last active November 24, 2018 09:32
Stress test of local service with K6
Testing code:
import http from "k6/http";
import { sleep } from "k6";
export let options = {
vus: 1000,
duration: "20s",
rps: 1000
};
Here, my database queries are prepend with >, and the response will be on the line after.
PostgreSQL:
> SELECT * FROM campaigns WHERE id = 5255555;
id | campaign | description | author | _user | country | pledged | goal | backers | enddate | _type
5255555 | Ergonomic Concrete Gloves | Campaign description | Kirsten Hayes | Kirsten67 | 3 | 227508 | 143131 | 204 | 1546646400 | 12
> SELECT * FROM campaigns WHERE _user = 'Kirsten67' LIMIT 10;
id | campaign | description | author | _user | country | pledged | goal | backers | enddate | _type
Here, my REST API calls are prepend with >, and the JSON response will be on the line after.
Test of listings endpoint with a given month and year
The JSON response is an array of arrays each containing the start and end dates of a reservation.
It is guaranteed that a succeeding reservation array has greater days that a prior one.
> http://127.0.0.1:3004/api/listings/0/reserved?month=7&year=2018
[[3,6],[9,11],[12,15],[17,18],[20,21],[22,25],[30,31]]
> http://127.0.0.1:3004/api/listings/0/reserved?month=8&year=2018
[[5,8],[12,13],[14,16],[16,18],[20,21],[27,29]]
@IamTechknow
IamTechknow / detectnet_notes.txt
Created July 3, 2018 00:22
Jetson Machine learning notes
DetectNet is a TensorRT CNN model and may be run on the Jetson TX1/2.
Let's figure out how to run this on Ubuntu 18.04:
0) Download qt4-default libglew-dev libgstreamermm-1.0-dev package
1) Add symlink to glibconfig.h: "sudo ln -s /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h glibconfig.h"
2) Add symlinks for tensorRT libraries:
sudo ln -s /usr/local/TensorRT-3.0.4/lib/libnvinfer.so libnvinfer.so
sudo ln -s /usr/local/TensorRT-3.0.4/lib/libnvcaffe_parser.so libnvcaffe_parser.so
3) To test with a webcam, go into detectnet-camera.cpp and change CAMERA from -1 to 0.
@IamTechknow
IamTechknow / dice_a_roo.user.js
Created August 5, 2017 05:18
Dice-A-Roo Hotkeys
// ==UserScript==
// @name Dice-A-Roo Hotkeys
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Dice-A-Roo Hotkeys
// @author iamtechknow
// @match http://www.neopets.com/games/play_dicearoo.phtml*
// @match http://www.neopets.com/games/dicearoo.phtml*
// @require https://code.jquery.com/jquery-3.2.1.min.js
// @grant none
// ==UserScript==
// @name Count Polygon Portals
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @version 1.0
// @description Count portals inside polygons in Ingress
// @author iamtechknow
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
// @match http://www.ingress.com/intel*
@IamTechknow
IamTechknow / icecaves_neopets_1.txt
Created July 5, 2017 07:00
Hannah and the Ice Caves save data
ww*%n1_yBZ~£bCzH(*\$Z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