Skip to content

[wpiutil] Add usage reporting API - #9339

Merged
PeterJohnson merged 4 commits into
wpilibsuite:mainfrom
PeterJohnson:wpiutil-usage-reporting
Aug 25, 2026
Merged

[wpiutil] Add usage reporting API#9339
PeterJohnson merged 4 commits into
wpilibsuite:mainfrom
PeterJohnson:wpiutil-usage-reporting

Conversation

@PeterJohnson

Copy link
Copy Markdown
Member

Similar to other things, this is connected to the HAL backend during robot construction.

This reduces the need for the Shared shims for individual components.

@PeterJohnson
PeterJohnson requested review from a team as code owners August 23, 2026 15:54
@github-actions github-actions Bot added component: wpiutil Utility library component: wpilibj WPILib Java component: wpilibc WPILib C++ component: command-based WPILib Command Based Library component: wpimath Math library type: testing Related to testing. build Monorepo organization, Gradle/CMake/Bazel, upstream_utils, etc robotpy Issues that affect RobotPy (Python) support component: epilogue Annotation-based logging library component: drivers labels Aug 23, 2026
calcmogul
calcmogul previously approved these changes Aug 23, 2026
calcmogul
calcmogul previously approved these changes Aug 23, 2026
Similar to other things, this is connected to the HAL backend during robot
construction.

This reduces the need for the Shared shims for individual components.
@PeterJohnson
PeterJohnson merged commit e985b0f into wpilibsuite:main Aug 25, 2026
50 of 91 checks passed

def _start(self, robot_cls: wpilib.RobotBase) -> bool:
hal.report_usage("Language", "Python")
wpiutil.set_report_usage_impl(hal.report_usage)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This forces usage reporting calls to go back through the Python interpreter. This would result in the GIL being released then soon after locked again on object construction. Are we okay with this overhead?

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

Labels

build Monorepo organization, Gradle/CMake/Bazel, upstream_utils, etc component: command-based WPILib Command Based Library component: drivers component: epilogue Annotation-based logging library component: wpilibc WPILib C++ component: wpilibj WPILib Java component: wpimath Math library component: wpiutil Utility library robotpy Issues that affect RobotPy (Python) support type: testing Related to testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants