Skip to content

Redirect profiling output from console to AKit wpilog#151

Open
nlaverdure wants to merge 1 commit intomainfrom
fix/profiling-to-wpilog
Open

Redirect profiling output from console to AKit wpilog#151
nlaverdure wants to merge 1 commit intomainfrom
fix/profiling-to-wpilog

Conversation

@nlaverdure
Copy link
Member

@nlaverdure nlaverdure commented Mar 14, 2026

Replaces every System.out.println inside PROFILING_ENABLED blocks with Logger.recordOutput calls, making timing data available in AdvantageScope instead of the console.

Affected subsystems

  • Robot — scheduler, game-state, and total loop time
  • Drive — lock, gyro update, gyro log, modules, disabled, odometry, and total
  • Module (×4) — updateInputs, log, rest, and total
  • Feeder — spindexer, kicker, spindexer log, kicker log, and total
  • Hopper — update, log, and total
  • Intake — update, log, and total
  • Launcher — update, log, aim log, ballistics, and total

All values are logged every cycle under the Profiling/ key hierarchy. The old threshold conditionals (e.g. if (totalMs > 5)) are removed — logging every cycle is cheap and outliers are easier to spot graphically in AdvantageScope.

Closes #146

Replaces all System.out.println() calls inside PROFILING_ENABLED blocks with
Logger.recordOutput() calls under the Profiling/ key hierarchy. Removes the
threshold conditionals (e.g. if (totalMs > 5)) since logging every cycle is
cheap and data is better analyzed graphically in AdvantageScope.

Closes #146

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nlaverdure nlaverdure requested a review from caparomula March 14, 2026 15:37
Copy link
Contributor

@caparomula caparomula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log profiling data without spamming console

2 participants