microsoft / microsoft/ebpf-for-windows
Add API to obtain number of map entries
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 311
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 21
Description
### Describe the feature you'd like supported
An API to return the number of map entries present inside a map. This would also require internal bookkeeping to keep track of the number of entries.
Current solution/workaround is to iterate through all of the map entries, but for a map that has a very large number of entries, this is time consuming and not efficient, especially when some cases only require us to know the map size (such as investigations for memory usage)
### Proposed solution
- Add internal tracking when a map entry is inserted and removed
- Add API to return the number of map entries actually used
- Optional - consider updating existing tooling to also query this API and return the number of map entries.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.