{"action":"opened","issue":{"url":"https://api.github.com/repos/dherault/serverless-offline/issues/549","repository_url":"https://api.github.com/repos/dherault/serverless-offline","labels_url":"https://api.github.com/repos/dherault/serverless-offline/issues/549/labels{/name}","comments_url":"https://api.github.com/repos/dherault/serverless-offline/issues/549/comments","events_url":"https://api.github.com/repos/dherault/serverless-offline/issues/549/events","html_url":"https://github.com/dherault/serverless-offline/issues/549","id":393575146,"node_id":"MDU6SXNzdWUzOTM1NzUxNDY=","number":549,"title":"Display Lambda Function Execution Time and Memory Usage?","user":{"login":"awwong1","id":2760111,"node_id":"MDQ6VXNlcjI3NjAxMTE=","avatar_url":"https://avatars0.githubusercontent.com/u/2760111?v=4","gravatar_id":"","url":"https://api.github.com/users/awwong1","html_url":"https://github.com/awwong1","followers_url":"https://api.github.com/users/awwong1/followers","following_url":"https://api.github.com/users/awwong1/following{/other_user}","gists_url":"https://api.github.com/users/awwong1/gists{/gist_id}","starred_url":"https://api.github.com/users/awwong1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awwong1/subscriptions","organizations_url":"https://api.github.com/users/awwong1/orgs","repos_url":"https://api.github.com/users/awwong1/repos","events_url":"https://api.github.com/users/awwong1/events{/privacy}","received_events_url":"https://api.github.com/users/awwong1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-21T19:59:06Z","updated_at":"2018-12-21T19:59:06Z","closed_at":null,"author_association":"NONE","body":"It is useful to see the execution time and memory usage of a lambda function (AWS bills on GB-seconds).\r\n```\r\nServerless: ANY /mypath (λ: server)\r\n# becomes\r\nServerless: ANY /mypath (λ: server, Duration: 80.34ms, Max Memory Used: 40mb)\r\n```\r\n----\r\nPerhaps adding additional flags `--showDuration` and `--showMemory` which would enable this feature?\r\nSeems like you could evaluate this using [`performance.timerify`](https://nodejs.org/api/perf_hooks.html#perf_hooks_performance_timerify_fn) and [`process.memoryUsage`](https://nodejs.org/api/process.html#process_process_memoryusage).\r\n\r\nIf this is useful to other people, I can submit a PR "}}
{"actor":{"display_login":"awwong1"}}