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

refactor(enginenetx): introduce stats and make tactic a struct #1291

Merged
merged 2 commits into from
Sep 21, 2023

Conversation

bassosimone
Copy link
Contributor

@bassosimone bassosimone commented Sep 21, 2023

This diff refactors the code to introduce a stats interface and to make the tactic a struct ~without methods attached.

We transform the tactic into a struct because we're planning on storing the tactics on disk and loading them.

We need stats to track what is working and choose which is the best tactic that we should employ.

In light of these two needs, it makes sense to transfer the reporting methods that previously were part of the tactic interface to stats.

With this diff, we temporarily lost the possibility of choosing which handshaker to use, which was not implemented anyway and needs some more work to reason about how we'd store this information on disk.

Part of ooni/probe#2531

This diff refactors the code to introduce a stats interface and
to make the tactic a struct ~without methods attached.

We transform the tactic into a struct because we're planning on storing
the tactics on disk and loading them.

We need stats to track what is working and choose which is the
best tactic that we should employ.

In light of these two needs, it makes sense to transfer the reporting
methods that previously were part of the tactic interface to stats.

Part of ooni/probe#2531
@bassosimone bassosimone changed the title refactor(enginenetx): introduce stats refactor(enginenetx): introduce stats and make tactic a struct Sep 21, 2023
@bassosimone bassosimone merged commit 7110bb9 into master Sep 21, 2023
6 of 8 checks passed
@bassosimone bassosimone deleted the issue/2531-small branch September 21, 2023 12:17
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this pull request Feb 13, 2024
…1291)

This diff refactors the code to introduce a stats interface and to make
the tactic a struct ~without methods attached.

We transform the tactic into a struct because we're planning on storing
the tactics on disk and loading them.

We need stats to track what is working and choose which is the best
tactic that we should employ.

In light of these two needs, it makes sense to transfer the reporting
methods that previously were part of the tactic interface to stats.

With this diff, we temporarily lost the possibility of choosing which
handshaker to use, which was not implemented anyway and needs some more
work to reason about how we'd store this information on disk.

Part of ooni/probe#2531
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