-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Added Benchmarking; Added Sampler to Prelude for Benchmarking #1071
base: main
Are you sure you want to change the base?
Conversation
After having these two types unified as A lot of users won't be exposed to this, as they will simply use the pre-defined Fuzzers in the Fuzz library, but for users crafting their own Fuzzers, do we want to introduce breaking changes? |
3efd57a
to
70daa4e
Compare
@@ -182,6 +183,7 @@ impl fmt::Display for Token { | |||
Token::Once => "once", | |||
Token::Validator => "validator", | |||
Token::Via => "via", | |||
Token::Benchmark => "benchmark", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call it bench
; not so much because it's shorter but because it's quite often used in benchmarking terminology (bench refer to the individual tests of a benchmark, which aggregates all benches).
pub name: String, | ||
pub on_test_failure: OnTestFailure, | ||
pub program: Program<Name>, | ||
pub fuzzer: Fuzzer<Name>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That last one is suspicious? It ought not to be a Fuzzer
here I believe.
pub enum Prng { | ||
Seeded { choices: Vec<u8>, uplc: PlutusData }, | ||
Replayed { choices: Vec<u8>, uplc: PlutusData }, | ||
Seeded { | ||
choices: Vec<u8>, | ||
uplc: PlutusData, | ||
iteration: usize, | ||
}, | ||
Replayed { | ||
choices: Vec<u8>, | ||
uplc: PlutusData, | ||
iteration: usize, | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is changing the PRNG necessary? I don't think that it is right? The size parameter should be holistic for an entire PRNG and influence all random choices down the line.
That'll certainly require quite a lot of change in the Fuzz library, which I think we can avoid by making the context be provided as a closure instead of passed as an extra parameter. So, fundamentally, have:
instead of
|
No description provided.