(requestID string, runtime *RuntimeInfo)
| 77 | } |
| 78 | |
| 79 | func NewRequestInfo(requestID string, runtime *RuntimeInfo) *RequestInfo { |
| 80 | now := time.Now().UnixNano() |
| 81 | return &RequestInfo{ |
| 82 | RequestID: requestID, |
| 83 | Runtime: runtime, |
| 84 | InvokeStartTimeNS: now, |
| 85 | InvokeStartTimeMS: now / int64(time.Millisecond), |
| 86 | SyncChannel: make(chan struct{}, 1), |
| 87 | TimeoutChannel: make(chan struct{}, 1), |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | func (info *RequestInfo) SetInitTime(preInit, postInit int64) { |
| 92 | info.InitStartTimeMS = preInit |
no outgoing calls