Open
Conversation
Introduce a new configurable workload parser. The workload definition
looks like this:
// Named work block
main (workers = 2, duration = 10) {
// Anon work block with only one unit.
// task(name) -- spawn a process with specified name
// debug(text) -- log with DEBUG level
// open(path) -- open file by path, create if needed and write something to it
debug("run task stub");
task(stub);
debug("open file /tmp/test");
open("/tmp/test");
} : exp {
// If no distribution provided, do the unit only once.
rate = 10.0;
}
Note that this commit only produces AST without JIT compiling it into anything
that looks like an actual code.
Molter73
reviewed
Feb 19, 2026
| Var { name: String }, | ||
|
|
||
| /// Helper like random_path | ||
| Dynamic { name: String, args: Vec<Arg> }, |
Contributor
There was a problem hiding this comment.
Oh lord, self referential structs/enums, this is going to be fun.
Mandatory "if you get into trouble you should read https://rust-unofficial.github.io/too-many-lists/" PSA.
Collaborator
Author
There was a problem hiding this comment.
Hm? The page you've posted doesn't mention self referential structures at all, am I missing something?
And even if it's somehow bad in Rust, what is your suggestion? Parsing AST without self references is like trying to hammer a nail without an actual hammer -- you probably can do this, but it will likely be very awkward.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a new configurable workload parser. The workload definition looks like this:
Note that this commit only produces AST without JIT compiling it into anything that looks like an actual code.