-
Notifications
You must be signed in to change notification settings - Fork 0
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
Automatic Profiling #127
base: main
Are you sure you want to change the base?
Automatic Profiling #127
Conversation
gave it a quick look, i'm not familiar with the logic on how to insert the methods on build but i'm good with it and testing. for performance, do we want to disable the features when at competition?? maybe disable when FMS is conencted? that way we can still do it in testing but not affect on field performance? |
Agreed, that's what |
sounds good. I say we test it thursday and if it works, lets merge 🤷♂️. |
Profiling inserted at compile-time to all classes (in package
frc
) with exception forMain
,Robot
, andRobotContainer
(these have manual implementations). All methods (except autogenerated methods likevalues
, orvalueOf
; and constructors) are modified with the following:Robot.profiler.push("<class name>:<method name>")
at the top of the methodRobot.profiler.pop()
prior to every return.Not sure if this works with exceptions. We'll need to investigate. Otherwise, this works as-is.
Future work would include modifying
CommandScheduler
to add profiling calls there too.Profiles are captured for every second. We'll need to tune this if on-robot performance gets too bad.