-
-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: Rename
Exponential
backoff to Quadratic
The `gix_utils::backoff::Exponential` type actually implemented quadratic, not exponential, backoff. This renames it from `Exponential` to `Quadratic`. In exponential backoff, delays are a fixed base, often 2, raised to a power of a number that increases by one with each attempt. When the number that increases by one with each attempt is the base, raised to a fixed power, that is quadratic backoff. The intended behavior here was quadratic, as implemented. For example, in the tests, `EXPECTED_TILL_SECOND` lists the values 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, and so on, which are ascending squares. If they were an exponential sequence, then they would look like 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, and so on. Thus, it is only the named that needed to be changed: the implementation was already as intended.
- Loading branch information
1 parent
38a0d9a
commit 5b33ded
Showing
3 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters