aws / aws/aws-lambda-runtime-interface-emulator
The "Init Duration" reported by the RIE is wrong
- Ngôn ngữ chính
- Go
- Star
- 1.1k
- Fork
- 118
- Merge trung bình
- 42 phút
- Pull request đã merge (30 ngày)
- 2
Mô tả
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)
}()
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu tại cmd/aws-lambda-rie/handlers.go, ở lệnh gọi InitHandler, sau đó theo dõi vòng đời init đến lambda/rapid/handlers.go và sendInitRuntimeDoneLogEvent(). Xác minh thời điểm giai đoạn Init kết thúc và đảm bảo Init Duration được báo cáo bao gồm thời gian khởi động language runtime; so sánh sự kiện log RIE thu được với timing dự kiến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- go
- Lĩnh vực
- tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 68/100