Skip to content
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

need Peers Count api #7539

Open
thienpow opened this issue Jul 15, 2020 · 2 comments
Open

need Peers Count api #7539

thienpow opened this issue Jul 15, 2020 · 2 comments
Labels
exp/novice Someone with a little familiarity can pick up kind/enhancement A net-new feature or improvement to an existing feature need/analysis Needs further analysis before proceeding P3 Low: Not priority right now topic/commands Topic commands

Comments

@thienpow
Copy link

the api lack of Peers Count

because pooling for peers count by getting a full list of peers is not making sense,

const peerInfos = await ipfs.swarm.peers({ timeout: 2500 })
return peerInfos.length

especially when the peers is around 6k-7k list... every 2.5s pooling for the long list is consuming CPU inefficiently.

Originally posted by @thienpow in #7528 (comment)

@welcome
Copy link

welcome bot commented Jul 15, 2020

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@Stebalien Stebalien added exp/novice Someone with a little familiarity can pick up kind/enhancement A net-new feature or improvement to an existing feature need/analysis Needs further analysis before proceeding P3 Low: Not priority right now topic/commands Topic commands labels Jul 20, 2020
@anthonybudd
Copy link

I agree this would be a helpful feature.

A simple workaround when using the cli is:
ipfs swarm peers | wc -l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up kind/enhancement A net-new feature or improvement to an existing feature need/analysis Needs further analysis before proceeding P3 Low: Not priority right now topic/commands Topic commands
Projects
None yet
Development

No branches or pull requests

3 participants