fix(measurex): use same keys of the OONI data format (#572)
This change should simplify the pipeline's job. Reference issue: https://github.com/ooni/probe/issues/1817. I previously dismissed this possibility, but now it seems clear it is simpler to have a very tabular data format internally and to convert such a format to OONI's data format when serializing. The OONI data format is what the pipeline expects, but processing is easier with a more linear/tabular format.
This commit is contained in:
parent
6f90d29bfa
commit
aa27bbe33f
35 changed files with 1539 additions and 993 deletions
|
|
@ -101,6 +101,15 @@ This is it. The rest of the program is exactly the same.
|
|||
for _, epnt := range httpEndpoints {
|
||||
m.Endpoints = append(m.Endpoints, mx.HTTPEndpointGetWithoutCookies(ctx, epnt))
|
||||
}
|
||||
```
|
||||
|
||||
(Note that here, like in the previous chapter, we are not converting
|
||||
to the OONI data format. Rather, we're just dumping the internally
|
||||
used data structures. Exercise: can you modify this program to emit
|
||||
a JSON compliant with the OONI data format by using the proper]
|
||||
conversion functions exported by `measurex`?)
|
||||
|
||||
```Go
|
||||
print(m)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,6 +102,15 @@ func main() {
|
|||
for _, epnt := range httpEndpoints {
|
||||
m.Endpoints = append(m.Endpoints, mx.HTTPEndpointGetWithoutCookies(ctx, epnt))
|
||||
}
|
||||
// ```
|
||||
//
|
||||
// (Note that here, like in the previous chapter, we are not converting
|
||||
// to the OONI data format. Rather, we're just dumping the internally
|
||||
// used data structures. Exercise: can you modify this program to emit
|
||||
// a JSON compliant with the OONI data format by using the proper]
|
||||
// conversion functions exported by `measurex`?)
|
||||
//
|
||||
// ```Go
|
||||
print(m)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue