diff --git a/src/commands/analyze-lambda-cold-starts.js b/src/commands/analyze-lambda-cold-starts.js index ee4a22d..c4ab5a6 100644 --- a/src/commands/analyze-lambda-cold-starts.js +++ b/src/commands/analyze-lambda-cold-starts.js @@ -205,12 +205,12 @@ class AnalyzeLambdaColdStartsCommand extends Command { async getProvisionedConcurrencyUtilization(region, functions) { const AWS = getAWSSDK(); const CloudWatch = new AWS.CloudWatch({ region }); - + const startTime = new Date(Date.now() - global.minutes * ONE_MIN_IN_MILLIS); const queries = _.flatMap(functions, ({ functionName, qualifiers }) => qualifiers.map(qualifier => this.utilizationMetric(functionName, qualifier)) ); - + // CloudWatch only allows 100 queries per request const promises = _.chunk(queries, 100).map(async chunk => { const resp = await CloudWatch.getMetricData({ diff --git a/src/commands/measure-lambda-cold-starts.js b/src/commands/measure-lambda-cold-starts.js index 5702fe6..7189a5f 100644 --- a/src/commands/measure-lambda-cold-starts.js +++ b/src/commands/measure-lambda-cold-starts.js @@ -80,7 +80,8 @@ class MeasureLambdaColdStartsCommand extends Command { } } -MeasureLambdaColdStartsCommand.description = "Measures a function's cold start duration (i.e. duration + initDuration)"; +MeasureLambdaColdStartsCommand.description = + "Measures a function's cold start duration (i.e. duration + initDuration)"; MeasureLambdaColdStartsCommand.flags = { functionName: flags.string({ char: "n",