Last active
March 21, 2016 14:32
-
-
Save alexcasalboni/aa7c3a2ff6ce2abf42bb to your computer and use it in GitHub Desktop.
AWS Lambda & Google Functions load test
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
| var md5 = require("md5"); | |
| exports.handler = function(context, data){ | |
| var n = Math.abs(data.n) || 1000, | |
| output = {}; | |
| for (var i=0; i < n; i++) { | |
| var s = "Number"+i; | |
| output[s] = md5(s); | |
| } | |
| context.success(output); | |
| } |
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
| var md5 = require("md5"); | |
| exports.handler = function(event, context){ | |
| var n = Math.abs(event.n) || 1000, | |
| output = {}; | |
| for (var i=0; i < n; i++) { | |
| var s = "Number"+i; | |
| output[s] = md5(s); | |
| } | |
| context.succeed(output); | |
| } |
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
| { | |
| "name": "hash-generator", | |
| "author": "Alex Casalboni", | |
| "main": "index-google.js", | |
| "dependencies": { | |
| "md5": "*" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment