This file contains hidden or 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
    
  
  
    
  | 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: | 
  
    
      This file contains hidden or 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
    
  
  
    
  | config: | |
| target: 'http://localhost:3000' | |
| http: | |
| pool: 10 | |
| phases: | |
| - duration: 60 | |
| arrivalRate: 1 | |
| rampTo: 20 | |
| - duration: 600 | |
| arrivalRate: 25 | 
  
    
      This file contains hidden or 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
    
  
  
    
  | * 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 | 
  
    
      This file contains hidden or 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
    
  
  
    
  | ##PostgreSQL | |
| #Sample Query | |
| SELECT * from videos WHERE id IN (SELECT associatedid FROM associatedvideos WHERE id=1); | |
| #Result | |
| movieid | name | url | id | |
| ---------+-----------------+---------------------------------------------+--------- | 
  
    
      This file contains hidden or 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
    
  
  
    
  | [ | |
| { | |
| "id": 1, | |
| "restaurantId": 1, | |
| "tableNumber": 3, | |
| "date": "Sun Apr 14", | |
| "time": 1140 | |
| }, | |
| { | |
| "id": 6, | 
  
    
      This file contains hidden or 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 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); | 
  
    
      This file contains hidden or 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
    
  
  
    
  | Empty file | 
  
    
      This file contains hidden or 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 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)); | 
  
    
      This file contains hidden or 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 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); | |
| // } | 
  
    
      This file contains hidden or 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 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); | |
| // } | 
NewerOlder