Instantly share code, notes, and snippets.

Embed
What would you like to do?
AWS Lambda & Google Functions load test
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);
}
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);
}
{
"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