Skip to content

Conversation

jasondaming
Copy link
Member

Summary

Adds instructions for using VisualVM to profile robot code in simulation, clarifying that no Gradle configuration changes are needed for simulation profiling (unlike roboRIO profiling).

Changes

  • Added new "Profiling Simulation" section before "Setting up Gradle for roboRIO Profiling"
  • Clarifies that Gradle changes are only needed for roboRIO profiling
  • Provides step-by-step instructions for profiling simulation
  • Mentions optional VisualVM VSCode extension

Fixes #2861

Clarifies that simulation profiling doesn't require Gradle configuration changes, unlike roboRIO profiling. Adds step-by-step instructions for profiling simulation and mentions the VSCode extension option.

Fixes wpilibsuite#2861

1. Launch VisualVM (see :ref:`Running VisualVM <docs/software/advanced-gradlerio/profiling-with-visualvm:Running VisualVM>` below for instructions)
2. Start your robot simulation from VS Code
3. In VisualVM, the simulation process will automatically appear in the left sidebar under "Local" as a Java process
Copy link
Collaborator

Choose a reason for hiding this comment

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

Having not done this, is it obvious what is the correct process to connect to? I could see it being likely that there's several java processes that show up between VS Code Java stuff, the robot code, gradle daemons, and wpilib tools.


To profile simulation:

1. Launch VisualVM (see :ref:`Running VisualVM <docs/software/advanced-gradlerio/profiling-with-visualvm:Running VisualVM>` below for instructions)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think it flows well to reference things down below that the user hasn't read yet. If simulation is the most common use case then build it into the instructions below, and then add the gradle instructions after that. Or alternately, move this section down below.

I can see arguments for either simulation or robot being the primary use case so I don't really care which one is moved down, but it seems convoluted the way it is now.

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.

Add instructions for using VisualVM for simulation

2 participants