You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to track and report various metrics for child processes created with assert_cmd. The kind of process metrics that you might track with /usr/bin/time or perf, such as instruction count, page faults, max memory, io counts, context switches, etc...
Some resources I found:
I found that /usr/bin/time uses the getrusagelibc api. (The man page also mentions vtimes().)
What would we then do with these metrics? At this time, libtest doesn't really let us report things of interest like this for bubblinb up to the user. Directly reporting it gets a bit weird because of parallel runs.
I guess the question of what to do with the metrics is up to the user, since this crate doesn't integrate directly with libtest (other than to panic on assertions where libtest expects).
I see that libtest has experimental Metric and MetricMap which could be useful here:
Maybe Command could expose a function to indicate a list of metrics to track and a way to export them after the command completes. Then the user can do whatever they want; if using the experimental Metrics they could export it there, else write it to a file or whatever.
I guess that metrics will be platform-specific enough that it will be impractical to try to make the collection system generic to the platform. Maybe the user would provide a list of metrics they would "like" to track and whichever ones are available on the current platform are tracked.
It would be nice to track and report various metrics for child processes created with assert_cmd. The kind of process metrics that you might track with
/usr/bin/time
orperf
, such as instruction count, page faults, max memory, io counts, context switches, etc...Some resources I found:
/usr/bin/time
uses the getrusage libc api. (The man page also mentionsvtimes()
.)Does anyone have a strong disposition for or against tracking performance metrics of processes started with assert_cmd?
The text was updated successfully, but these errors were encountered: