Skip to content

Instantly share code, notes, and snippets.

View asuluntas's full-sized avatar

Aysun Sulun Tas asuluntas

  • Sunnyvale, CA
View GitHub Profile
I tested proxy for my module individually and 2 modules at a time because Loader.io was limited to get 2 request per test.
Config details:
- Tested different number of clients per second for 60 seconds but if I had a chance I would test longer to get more accurate results.
- Tested Get and Post request in different tests because out page wouldn't get equeal number of Get and Post requests. Loader.io doesn't have a weight option.
- Error rate was set to 1% and time out was set to 2 seconds.
Sample Results:
Proxy results with video module before load balancing:
config:
target: 'http://localhost:3000'
http:
pool: 10
phases:
- duration: 60
arrivalRate: 1
rampTo: 20
- duration: 600
arrivalRate: 25
@asuluntas
asuluntas / Local Load Test
Last active April 29, 2019 06:10
Local stress test results video module of Fandangit App for GET, POST and GET+POST requests
* Id is selected randomly from a cvs file. Range is 1 to 10000.
ARTILLERY CONFIG FILE:
config:
target: 'http://localhost:3001/videos'
http:
pool: 10
phases:
- duration: 60
arrivalRate: 10
@asuluntas
asuluntas / Sample Queries
Last active April 25, 2019 01:49
Shows sample queries for main-video-carousel module for PostgreSQL and Cassandra
##PostgreSQL
#Sample Query
SELECT * from videos WHERE id IN (SELECT associatedid FROM associatedvideos WHERE id=1);
#Result
movieid | name | url | id
---------+-----------------+---------------------------------------------+---------
@asuluntas
asuluntas / API Call
Last active April 2, 2019 18:34
Response for GET Request to http://localhost:3000/api/restaurants/1/"Sun Apr 14"/1140 (Shows reservations starting from 1 hour ago, ending at 1 hour later.)
[
{
"id": 1,
"restaurantId": 1,
"tableNumber": 3,
"date": "Sun Apr 14",
"time": 1140
},
{
"id": 6,
@asuluntas
asuluntas / 2
Created January 24, 2019 20:48
PerfectJovialRuntimelibrary created by asuluntas - https://repl.it/@asuluntas/PerfectJovialRuntimelibrary
function each(array, f) {
for (var i = 0; i <array.length; i++) {
f(array[i]);
}
}
function reduce(array, f, start) {
var acc = start;
each(array, function(element) {
acc = f(acc, element);
@asuluntas
asuluntas / 2
Created January 24, 2019 08:09
PerfectJovialRuntimelibrary created by asuluntas - https://repl.it/@asuluntas/PerfectJovialRuntimelibrary
Empty file
@asuluntas
asuluntas / index.js
Created January 22, 2019 23:06
PiercingPreemptiveProcesses created by asuluntas - https://repl.it/@asuluntas/PiercingPreemptiveProcesses
function each(array, f) {
for (var i = 0; i < array.length; i++) {
f(array[i]);
}
}
function map(array, f) {
var acc = [];
each(array, function(element) {
acc.push(f(element));
@asuluntas
asuluntas / index.js
Created January 22, 2019 08:29
ElectricCloseSubweb created by asuluntas - https://repl.it/@asuluntas/ElectricCloseSubweb
// function each(coll, f) {
// if (Array.isArray(coll)) {
// for (var i = 0; i < coll.length; i++) {
// f(coll[i], i);
// }
// } else {
// for (var key in coll) {
// f(coll[key], key);
// }
@asuluntas
asuluntas / index.js
Created January 22, 2019 08:29
ElectricCloseSubweb created by asuluntas - https://repl.it/@asuluntas/ElectricCloseSubweb
// function each(coll, f) {
// if (Array.isArray(coll)) {
// for (var i = 0; i < coll.length; i++) {
// f(coll[i], i);
// }
// } else {
// for (var key in coll) {
// f(coll[key], key);
// }