Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

feat: .stats.bw* - Bandwidth Stats #1230

Merged
merged 3 commits into from
Mar 16, 2018
Merged

feat: .stats.bw* - Bandwidth Stats #1230

merged 3 commits into from
Mar 16, 2018

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Feb 20, 2018

It was decided on #1198 that the implementation of the Bandwidth Stats should be done in a different PR since it first needs libp2p/js-libp2p#157 to get merged. This issue is used to track the progress on that.

Prerequisites

ToDos

  • Core
    • ipfs.stats.bw
    • ipfs.stats.bwReadableStream
    • ipfs.stats.bwPullStream
  • HTTP /api/v0/stats/bw
  • CLI ipfs stats bw

@ghost ghost assigned hacdias Feb 20, 2018
@ghost ghost added the status/in-progress In progress label Feb 20, 2018
@daviddias daviddias changed the title Implement Stats Bandwidth feat: .stats.bw* - Bandwidth Stats Feb 21, 2018
@hacdias hacdias force-pushed the stats-bandwidth branch 2 times, most recently from 509d6ee to ecb04c0 Compare February 26, 2018 08:56
@hacdias hacdias force-pushed the stats-bandwidth branch 3 times, most recently from 36bb4e3 to 028d2b0 Compare March 11, 2018 18:01
@hacdias hacdias force-pushed the stats-bandwidth branch 3 times, most recently from 6bbcc47 to 11d26d4 Compare March 14, 2018 16:35
@hacdias
Copy link
Member Author

hacdias commented Mar 14, 2018

@diasdavid do you think we need more tests than the ones from interface-ipfs-core?

@daviddias
Copy link
Member

@hacdias libp2p/js-libp2p#169 done :)

@hacdias hacdias force-pushed the stats-bandwidth branch 2 times, most recently from 3489ded to 52ad8dc Compare March 15, 2018 17:24
@hacdias
Copy link
Member Author

hacdias commented Mar 15, 2018

@diasdavid do you have any idea why is this test failing since I updated the libp2p? It seems that we need to change it to expect(PeerId.isPeerId(peer.peer.id)).to.equal(true) to pass. It doesn't seem to be correct according to ipfs/interface-ipfs-core:SPEC/SWARM.md@master#peers.

@diasdavid just pushed 09b02e2 which fixes the issue.

/cc @alanshaw

@hacdias
Copy link
Member Author

hacdias commented Mar 15, 2018

So, my fix only made more stuff to fail. @alanshaw I see that you were the one who changed that code so I think you should know more about this than I do.

Anyway, this PR wasn't created to fix other issues than to create the .stats.bw* interface. That's done and the tests are passing. @diasdavid could you please merge ipfs-inactive/interface-js-ipfs-core#225 and release a new version in order to update the interface-ipfs-core here and merge this, please?

@daviddias
Copy link
Member

@hacdias rebased master onto this branch, it should all be fine. Please confirm.

bw Outdated
@@ -0,0 +1 @@
{"TotalIn":"0","TotalOut":"0","RateIn":"0","RateOut":"0"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hacdias where does this file come from?

@daviddias
Copy link
Member

image

Woot! Thanks @hacdias ❤️

@daviddias daviddias merged commit 9694925 into master Mar 16, 2018
@daviddias daviddias deleted the stats-bandwidth branch March 16, 2018 22:01
@ghost ghost removed the status/in-progress In progress label Mar 16, 2018
@hacdias
Copy link
Member Author

hacdias commented Mar 17, 2018

Thanks 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants