-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sys/bus_stats: Add module to collect bus statistics #19483
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
Open
maribu
wants to merge
5
commits into
RIOT-OS:master
Choose a base branch
from
maribu:sys/bus_stats
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,044
−3
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example output of the shell command to tease the feature a bit:
|
I dropped the commit to enable MathJax support in Doxygen. The generated table documenting the histogram bucket sizes will look ugly without tex commands being rendered, but it's not too bad. |
There is no need for shell commands if there is no shell.
The shell_cmds module depends on the shell module. This was correctly added to KConfig, but the Makefile dependencies missed this one. This commit adds the missing dep.
Provide the correct CS pin to spi_acquire(); spi_acquire() itself doesn't do any CS pin handling anyway but for statistics collecting it is useful to have the correct SPI pin passed.
bors bot
added a commit
that referenced
this pull request
Apr 22, 2023
19485: sys/shell: Fix missing dependency r=aabadie a=maribu ### Contribution description The shell commands depend on the shell module being use. This was already the case in KConfig, but was overlooked in the shell's `Makefile.dep`. In addition, this uncovered that `tests/memarray` had a bogus dependency on shell commands without every using the shell. ### Testing procedure Ideally binaries should not differ (except for debug section). ### Issues/PRs references Split out of #19483 Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: build system
Area: Build system
Area: doc
Area: Documentation
Area: drivers
Area: Device drivers
Area: Kconfig
Area: Kconfig integration
Area: sys
Area: System
Area: tests
Area: tests and testing framework
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Type: new feature
The issue requests / The PR implemements a new feature for RIOT
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
This adds the following modules
bus_stats
: Common infrastructure to collect bus usage statisticsbus_stats_spi
: SPI hooks to collect usage stats of SPI attached endpointsspi_acquire()
,spi_release()
,spi_transfer_bytes()
, ... to allow collection of statisticsbus_stats_i2c
: Same asbus_stats_spi
, but for I2Cshell_cmd_bus_stats
: Shell command to print / clear bus statisticsThe documentation provided contains details on usage, terminology, and metrics.
Testing procedure
A test application was provided in
tests/sys_bus_stats
that adds monitoring for BME680 and/or BMx280 sensors connected via either SPI or I2C. Additional XFA entries could be easily added to monitor communication more I2C or SPI attached devices.Issues/PRs references
Depends on and includes: #19481(Doc will look a bit ugly until MathJax support is added, but nothing too scary)