Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(measurex): refactored measurement library #528

Merged
merged 1 commit into from
Sep 29, 2021
Merged

Conversation

bassosimone
Copy link
Contributor

@bassosimone bassosimone commented Sep 29, 2021

Checklist

Location of the issue tracker: https://github.com/ooni/probe

Description

This commit introduce a measurement library that consists of
refactored code from earlier websteps experiments.

I am not going to add tests for the time being, because this library
is still a bit in flux, as we finalize websteps.

I will soon though commit documentation explaining in detail how
to use it, which currrently is at #506
and adds a new directory to internal/tutorial.

The core idea of this measurement library is to allow two
measurement modes:

  1. tracing, which is what we're currently doing now, and the
    tutorial shows how we can rewrite the measurement part of web
    connectivity with measurex using less code. Under a tracing
    approach, we construct a normal http.Client that however has
    tracing configured, we gather events for resolve, connect, TLS
    handshake, QUIC handshake, HTTP round trip, etc. and then we
    try to make sense of what happened from the events stream;

  2. step-by-step, which is what websteps does, and basically
    means that after each operation you immediately write into
    a Measurement structure its results and immediately draw the
    conclusions on what seems odd (which later may become an
    anomaly if we see what the test helper measured).

This library is also such that it produces a data format
compatible with the current OONI spec.

This work is part of ooni/probe#1733.

This commit introduce a measurement library that consists of
refactored code from earlier websteps experiments.

I am not going to add tests for the time being, because this library
is still a bit in flux, as we finalize websteps.

I will soon though commit documentation explaining in detail how
to use it, which currrently is at #506
and adds a new directory to internal/tutorial.

The core idea of this measurement library is to allow two
measurement modes:

1. tracing, which is what we're currently doing now, and the
tutorial shows how we can rewrite the measurement part of web
connectivity with measurex using less code. Under a tracing
approach, we construct a normal http.Client that however has
tracing configured, we gather events for resolve, connect, TLS
handshake, QUIC handshake, HTTP round trip, etc. and then we
try to make sense of what happened from the events stream;

2. step-by-step, which is what websteps does, and basically
means that after each operation you immediately write into
a Measurement structure its results and immediately draw the
conclusions on what seems odd (which later may become an
anomaly if we see what the test helper measured).

This library is also such that it produces a data format
compatible with the current OONI spec.

This work is part of ooni/probe#1733.
@bassosimone bassosimone merged commit 399d2f6 into master Sep 29, 2021
@bassosimone bassosimone deleted the issue/1733 branch September 29, 2021 23:24
ainghazal pushed a commit to ainghazal/probe-cli that referenced this pull request Mar 8, 2022
This commit introduce a measurement library that consists of
refactored code from earlier websteps experiments.

I am not going to add tests for the time being, because this library
is still a bit in flux, as we finalize websteps.

I will soon though commit documentation explaining in detail how
to use it, which currrently is at ooni#506
and adds a new directory to internal/tutorial.

The core idea of this measurement library is to allow two
measurement modes:

1. tracing, which is what we're currently doing now, and the
tutorial shows how we can rewrite the measurement part of web
connectivity with measurex using less code. Under a tracing
approach, we construct a normal http.Client that however has
tracing configured, we gather events for resolve, connect, TLS
handshake, QUIC handshake, HTTP round trip, etc. and then we
try to make sense of what happened from the events stream;

2. step-by-step, which is what websteps does, and basically
means that after each operation you immediately write into
a Measurement structure its results and immediately draw the
conclusions on what seems odd (which later may become an
anomaly if we see what the test helper measured).

This library is also such that it produces a data format
compatible with the current OONI spec.

This work is part of ooni/probe#1733.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant