-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use microseconds instead of milliseconds to generate higher throughput #5
base: main
Are you sure you want to change the base?
Use microseconds instead of milliseconds to generate higher throughput #5
Conversation
What happens if you use an "old" config file, like the ones in https://github.com/boschglobal/kuksa-perf/tree/fix/cycle_time_microseconds/data Will you get an error or will it silently just ignore the old setting? I would prefer that it gives an error so that it just not silently ignore the old setting. Are there more existing scripts that needs to be updated? |
Forgot to push the modified files |
data/data_group_2.json
Outdated
@@ -11,7 +11,7 @@ | |||
}, | |||
{ | |||
"group_name": "Frame 2", | |||
"cycle_time_ms": 20, | |||
"cycle_time_microseconds": 20, |
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.
Just want to make sure that it is intentional to change semantic meaning of the example, i.e. that we in some cases (like here) keep the numeric value, in other multiply be 100
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.
It was actually non intentional, just left some value, provided more realistic values
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.
LGTM
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.
I think it makes a lot more sense to keep the "cycle_time_ms"
in order to not break all old configs. In addition, I think it's a lot more common to specify cycle time in milliseconds rather than microseconds.
TL;DR
Add "cycle_time_us"
in addition to "cycle_time_ms"
instead of replacing it.
EDIT: Or skip adding "cycle_time_us"
altogether and instead have the existing config accept a decimal number for the cycle time, e.g. "cycle_time_ms": 0.1
.
@@ -21,7 +21,7 @@ pub struct Config { | |||
#[derive(Deserialize, Clone)] | |||
pub struct Group { | |||
pub group_name: String, | |||
pub cycle_time_ms: u16, |
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.
Instead of hardcoding it to either ms or microseconds (and choosing between a u16
and u32
), it would be better to store it as a Duration
. That's what we want in the end anyway, and would make it equally easy to set with either milliseconds, microseconds or anything else as input.
If we need to support specifying the cycle time in microseconds I would much prefer to add this in addition to the existing configuration option, i.e. support both EDIT: Or just have |
No description provided.