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(enginenetx): add policy based on stats #1312

Merged
merged 5 commits into from
Sep 26, 2023
Merged

feat(enginenetx): add policy based on stats #1312

merged 5 commits into from
Sep 26, 2023

Conversation

bassosimone
Copy link
Contributor

@bassosimone bassosimone commented Sep 26, 2023

This policy first checks the stats and sorts the entries for which we have the highest nonzero success rate. Then, we use an underlying policy to produce additional suitable tactics for the HTTPS dialer.

There is a check preventing the same tactic from being emitted twice. This means that, if we emit a tactic looking into the stats, we're not going to emit the same exact tactic again when using our beacons policy generator.

Also, because we try using stable sorting, and assuming some tactics work, we would most likely continue using the tactics that work, until something bad happens and we need to try and see whether other tactics work.

While there, rename statstracker{,_test}.go to statsmanager{,_test}.go because the type inside it is called "state manager". The state tracker is an abstract concept only used by the https dialer code.

Part of ooni/probe#2531

This policy first checks the stats and sorts the entries for which
we have the highest success rate. Then, we use an underlying policy
to produce suitable tactics for the HTTPS dialer.

While there, rename statstracker{,_test}.go to statsmanager{,_test}.go
because the type inside it is called "state manager". The state
tracker is an abstract concept only used by the https dialer code.

Part of ooni/probe#2531
@bassosimone bassosimone merged commit 4e1abe0 into master Sep 26, 2023
8 checks passed
@bassosimone bassosimone deleted the issue/2531 branch September 26, 2023 17:36
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this pull request Feb 13, 2024
This policy first checks the stats and sorts the entries for which we
have the highest nonzero success rate. Then, we use an underlying policy
to produce additional suitable tactics for the HTTPS dialer.

There is a check preventing the same tactic from being emitted twice.
This means that, if we emit a tactic looking into the stats, we're not
going to emit the same exact tactic again when using our beacons policy
generator.

Also, because we try using stable sorting, and assuming some tactics
work, we would most likely continue using the tactics that work, until
something bad happens and we need to try and see whether other tactics
work.

While there, rename statstracker{,_test}.go to statsmanager{,_test}.go
because the type inside it is called "state manager". The state tracker
is an abstract concept only used by the https dialer code.

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