Add a way to print resource limits and current consumption
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.9k
- Forks
- 1.3k
- Avg merge
- 13d 21h
- Merged PRs (30d)
- 1
Description
What
It would be useful to have a way to inspect resource manager limits and current consumption in a go-libp2p host. This could help with debugging and monitoring.
How I currently do it
rm := h.Network().ResourceManager()
rm.ViewSystem(
func(rs network.ResourceScope) error {
fmt.Printf("stats: %+v\n", rs.Stat())
if r, ok := rs.(interface{ Limit() rcmgr.Limit }); ok {
fmt.Printf("limits: %+v\n", r.Limit())
}
return nil
},
)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Go resource-manager access point shown in the issue: h.Network().ResourceManager().Read the ViewSystem callback and the ResourceScope Stat and Limit interfaces to understand the existing inspection data. Done means a host can expose resource-manager limits and current consumption through a documented, usable mechanism; the payload names no tests or files to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking, observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100