Benchmark was done using siege. I made it to see how big abstraction is in http & express according to base layer of net.
nvm use Xnode http.js &siege -r 500 -c 200 -b http://localhost:3001/
| import addPrivacy from './addPrivacy' | |
| class User { | |
| constructor (username, password) { | |
| this.username = username | |
| this.password = password | |
| } | |
| login () { | |
| console.log('Trying to log in with username: %s, password: %s', this.username, this.password) |
| function currentYPosition() { | |
| // Firefox, Chrome, Opera, Safari | |
| if (self.pageYOffset) return self.pageYOffset; | |
| // Internet Explorer 6 - standards mode | |
| if (document.documentElement && document.documentElement.scrollTop) | |
| return document.documentElement.scrollTop; | |
| // Internet Explorer 6, 7 and 8 | |
| if (document.body.scrollTop) return document.body.scrollTop; |