aws / aws/aws-lambda-runtime-interface-emulator
The "Init Duration" reported by the RIE is wrong
- 主要语言
- Go
- 星标
- 1.1k
- 派生
- 118
- 平均合并
- 42 分钟
- 30 天内合并 PR
- 2
描述
The "Init Duration" reported by the RIE is much too small. It is taken [before the actual language runtime is even started](https://github.com/aws/aws-lambda-runtime-interface-emulator/blob/2057adac54dbd781b51431f775363ec021648c77/cmd/aws-lambda-rie/handlers.go#L98):
```go
initStart, initEnd := InitHandler(sandbox, functionVersion, timeout, bs)
```
Instead, the end of the Init phase should be recorded when the [`sendInitRuntimeDoneLogEvent()`](https://github.com/aws/aws-lambda-runtime-interface-emulator/blob/2057adac54dbd781b51431f775363ec021648c77/lambda/rapid/handlers.go#L358) is posted:
```go
defer func() {
sendInitRuntimeDoneLogEvent(execCtx, sbInfoFromInit.SandboxType, runtimeDoneStatus)
}()
```
贡献指南
调研方向
从 cmd/aws-lambda-rie/handlers.go 中的 InitHandler 调用开始,然后跟踪 init 生命周期,直到 lambda/rapid/handlers.go 和 sendInitRuntimeDoneLogEvent()。验证 Init 阶段何时结束,并确保报告的 Init Duration 包含 language runtime 启动时间;将生成的 RIE 日志事件与预期 timing 进行比较。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100