-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce property tests for stable throttle (#660)
* Introduce property tests for stable throttle We have, lately, wondered if the stable throttle was giving too much capacity to its clients. This PR is an attempt to answer that question through property testing. Note I have separated out the async and non-async bits of `Stable` and am property testing the non-async bit, making it feasible to do this kind of examination. I suspect I can do the same for the predictive throttle. Signed-off-by: Brian L. Troutwine <[email protected]> * add test config Signed-off-by: Brian L. Troutwine <[email protected]> * always check granted requests Signed-off-by: Brian L. Troutwine <[email protected]> * Shift throttle code to lading_throttle, kani I would really like to establish that the stable throttle behaves the way that we expect. This commit does a few things. Firstly we move the throttle code to a crate with minimal dependencies, allowing us to run the kani proof tool on that new crate. Second, I introduce a kani experiment for the major property test. This takes... some time to run and as of this writing I'm not sure of the results. Finally, the predictive throttle is gone. In practice it wasn't used because its results were too surprising. Signed-off-by: Brian L. Troutwine <[email protected]> * PR review Signed-off-by: Brian L. Troutwine <[email protected]> * CI fixes Signed-off-by: Brian L. Troutwine <[email protected]> * property ding Signed-off-by: Brian L. Troutwine <[email protected]> * checkpoint Signed-off-by: Brian L. Troutwine <[email protected]> * checkpoint Signed-off-by: Brian L. Troutwine <[email protected]> * pass static Signed-off-by: Brian L. Troutwine <[email protected]> * checkpoint Signed-off-by: Brian L. Troutwine <[email protected]> * further shrink Signed-off-by: Brian L. Troutwine <[email protected]> * checkpoint Signed-off-by: Brian L. Troutwine <[email protected]> * draw down on the interval cell, not add to Signed-off-by: Brian L. Troutwine <[email protected]> * re-expand experiments, fix kani proof Signed-off-by: Brian L. Troutwine <[email protected]> * 0.17.5-rc1 Signed-off-by: Brian L. Troutwine <[email protected]> * comment fix Signed-off-by: Brian L. Troutwine <[email protected]> * update README Signed-off-by: Brian L. Troutwine <[email protected]> * 0.18.0 Signed-off-by: Brian L. Troutwine <[email protected]> * install protobuf in release Signed-off-by: Brian L. Troutwine <[email protected]> --------- Signed-off-by: Brian L. Troutwine <[email protected]>
- Loading branch information
Showing
28 changed files
with
469 additions
and
671 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "lading" | ||
version = "0.17.4" | ||
version = "0.18.0" | ||
authors = ["Brian L. Troutwine <[email protected]>", "George Hahn <[email protected]"] | ||
edition = "2021" | ||
license = "MIT" | ||
|
@@ -11,8 +11,8 @@ description = "A tool for load testing daemons." | |
|
||
[dependencies] | ||
lading-capture = { version = "0.1", path = "../lading_capture" } | ||
lading-throttle = { path = "../lading_throttle" } | ||
|
||
async-trait = { version = "0.1", default-features = false, features = [] } | ||
byte-unit = { version = "4.0", features = ["serde"] } | ||
bytes = { version = "1.4.0", default-features = false, features = ["std"] } | ||
clap = { version = "3.2", default-features = false, features = ["std", "color", "suggestions", "derive"] } | ||
|
@@ -22,7 +22,7 @@ http = "0.2" | |
http-serde = "1.1" | ||
hyper = { version = "0.14", features = ["client"] } | ||
is_executable = "1.0.1" | ||
metrics = { version = "0.21", default-features = false } | ||
metrics = { workspace = true } | ||
metrics-exporter-prometheus = { version = "0.12.1", default-features = false, features = ["http-listener"]} | ||
metrics-util = { version = "0.15" } | ||
nix = { version = "0.26" } | ||
|
@@ -39,9 +39,9 @@ serde_json = {workspace = true } | |
serde_qs = "0.12" | ||
serde_tuple = { version = "0.5", default-features = false } | ||
serde_yaml = "0.9" | ||
thiserror = { version = "1.0" } | ||
thiserror = { workspace = true } | ||
time = { version = "0.3", features = ["formatting"] } | ||
tokio = { version = "1.29", features = ["rt", "rt-multi-thread", "macros", "fs", "io-util", "process", "signal", "time", "net"] } | ||
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros", "fs", "io-util", "process", "signal", "time", "net"] } | ||
tokio-util = { version = "0.7", features = ["io"] } | ||
tonic = { version = "0.9" } | ||
tower = { version = "0.4", default-features = false, features = ["timeout", "limit", "load-shed"] } | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Seeds for failure cases proptest has generated in the past. It is | ||
# automatically read and these particular cases re-run before any | ||
# novel cases are generated. | ||
# | ||
# It is recommended to check this file in to source control so that | ||
# everyone who runs the test benefits from these saved cases. | ||
cc d9a4fb20b7328d6983ce4d71a10a02073955cae69a9f75c6d6dd60a959a6e756 # shrinks to seed = 0, max_bytes = 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Seeds for failure cases proptest has generated in the past. It is | ||
# automatically read and these particular cases re-run before any | ||
# novel cases are generated. | ||
# | ||
# It is recommended to check this file in to source control so that | ||
# everyone who runs the test benefits from these saved cases. | ||
cc 08df0e78646a65c4d6f6d21db705b6cd3e675060117d2045a79c9488f39a8ff0 # shrinks to maximum_capacity = 1, last_tick = 0, mut ticks_requests = [(0, 1)] |
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
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
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
Oops, something went wrong.