libp2p / libp2p/go-libp2p

Add a way to print resource limits and current consumption

Open
#3,193 4 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.