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:
Simone Basso 2022-08-25 13:41:26 +02:00 committed by GitHub
commit 6ef3febf69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 51 additions and 30 deletions

View file

@ -437,13 +437,15 @@ func TestNewAnnotationArchivalNetworkEvent(t *testing.T) {
operation = "tls_handshake_start"
)
expect := &model.ArchivalNetworkEvent{
Address: "",
Failure: nil,
NumBytes: 0,
Operation: operation,
Proto: "",
T: duration.Seconds(),
Tags: []string{},
Address: "",
Failure: nil,
NumBytes: 0,
Operation: operation,
Proto: "",
T0: duration.Seconds(),
T: duration.Seconds(),
TransactionID: index,
Tags: []string{},
}
got := NewAnnotationArchivalNetworkEvent(
index, duration, operation,