Skip to content

Add per-subsystem periodic loop timing telemetry#53

Open
raahilparikh wants to merge 1 commit into
v3-pre-worldsfrom
codex/add-loop-time-tracking-to-telemetry
Open

Add per-subsystem periodic loop timing telemetry#53
raahilparikh wants to merge 1 commit into
v3-pre-worldsfrom
codex/add-loop-time-tracking-to-telemetry

Conversation

@raahilparikh

Copy link
Copy Markdown

Motivation

  • Provide live visibility into how much time each step in Bot.periodic() consumes so loop-time spikes can be attributed to specific subsystems.

Description

  • Introduced Bot.PeriodicTiming to hold per-step durations (ms) and a periodicTiming instance to store the most recent measurements.
  • Instrumented Bot.periodic() with System.nanoTime() checkpoints between each major call to record timings for clearBulkCache, updateSensorCache, limelight, turret, lift, intake, screen, drive.updatePoseEstimate, and the total periodic time.
  • Added getPeriodicTiming() accessor on Bot and surfaced all timing buckets plus the periodic total in MainTeleop telemetry for live display.

Testing

  • Attempted a compile check with ./gradlew :TeamCode:compileDebugJavaWithJavac and the build failed in this environment due to a Java/Gradle compatibility issue (Unsupported class file major version 69), indicating an environment mismatch rather than a code-level compile error.
  • No other automated tests were run in this environment.

Codex Task

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant