feat(measurexlite): add T0 and TransactionID (#879)
The T0 field is the moment when we started collecting data, while T is the moment when we finished collecting data. The TransactionID field will be repurposed for step-by-step measurements to indicate related observations collected as part of the same flow (e.g., TCP+TLS+HTTP). Note that, for now, this change will only affect measurexlite and we're not planning on changing other libraries for measuring. Part of https://github.com/ooni/probe/issues/2137
This commit is contained in:
parent
c9943dff38
commit
6ef3febf69
8 changed files with 51 additions and 30 deletions
|
|
@ -134,13 +134,15 @@ func addrStringIfNotNil(addr net.Addr) (out string) {
|
|||
func NewArchivalNetworkEvent(index int64, started time.Duration, operation string, network string,
|
||||
address string, count int, err error, finished time.Duration) *model.ArchivalNetworkEvent {
|
||||
return &model.ArchivalNetworkEvent{
|
||||
Address: address,
|
||||
Failure: tracex.NewFailure(err),
|
||||
NumBytes: int64(count),
|
||||
Operation: operation,
|
||||
Proto: network,
|
||||
T: finished.Seconds(),
|
||||
Tags: []string{},
|
||||
Address: address,
|
||||
Failure: tracex.NewFailure(err),
|
||||
NumBytes: int64(count),
|
||||
Operation: operation,
|
||||
Proto: network,
|
||||
T0: started.Seconds(),
|
||||
T: finished.Seconds(),
|
||||
TransactionID: index,
|
||||
Tags: []string{},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue