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(measurexlite): Trace now implements MeasuringNetwork #1262

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

bassosimone
Copy link
Contributor

@bassosimone bassosimone commented Sep 14, 2023

This diff is still yak shaving for ooni/probe#2531 but produces some nice side effects. Now, we can either use netxlite.Netx or measurexlite.Trace as a dependency for measuring code.

The cost of this change is (1) switching some functions to use a model.DebugLogger, which is not an issue, and (2) adding some optional wrappers to other functions. I made these functions to ignore the wrappers and documented this limitation, because measurexlite code does not need this functionality. It is a bit debateable whether this is the best way to implement this change, but I am doing this because I would like to see these wrappers gone when we stop using legacy/netx in the codebase, so I think it's fine to ignore them, to better signal they're deprecated stuff.

This change is absolutely in line with the original spirit of measurexlite because it's now much simpler to write code for netxlite and then upgrade to measurexlite.

I noticed this possibility yesterday while working on a much larger diff, and now I am committing this smaller diff to start the working day.

This diff is still yak shaving for ooni/probe#2531
but produces some nice side effects. Now, we can either use netxlite.Netx
or measurexlite.Trace as a dependency for measuring code.

This change is absolutely in line with the original spirit of measurexlite
because it's now much simpler to write code for netxlite and then upgrade
to measurexlite.

I noticed this possibility yesterday while working on a much larger
diff, and now I am committing this smaller diff to start the working day.
@bassosimone bassosimone merged commit 90366e5 into master Sep 14, 2023
6 checks passed
@bassosimone bassosimone deleted the issue/2531 branch September 14, 2023 08:07
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this pull request Feb 13, 2024
This diff is still yak shaving for
ooni/probe#2531 but produces some nice side
effects. Now, we can either use netxlite.Netx or measurexlite.Trace as a
dependency for measuring code.

The cost of this change is (1) switching some functions to use a
`model.DebugLogger`, which is not an issue, and (2) adding some optional
wrappers to other functions. I made these functions to ignore the
wrappers and documented this limitation, because measurexlite code does
not need this functionality. It is a bit debateable whether this is the
best way to implement this change, but I am doing this because I would
like to see these wrappers gone when we stop using legacy/netx in the
codebase, so I think it's fine to ignore them, to better signal they're
deprecated stuff.

This change is absolutely in line with the original spirit of
measurexlite because it's now much simpler to write code for netxlite
and then upgrade to measurexlite.

I noticed this possibility yesterday while working on a much larger
diff, and now I am committing this smaller diff to start the working
day.
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