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

Add monitor #375

Merged
merged 12 commits into from
Sep 9, 2024
Merged

Add monitor #375

merged 12 commits into from
Sep 9, 2024

Conversation

MKPLKN
Copy link
Contributor

@MKPLKN MKPLKN commented Sep 1, 2024

Example usage:

const monitor = drive.monitor(file)
await monitor.ready()
monitor.on('update', () => {
  // object of upload/download stats, updated on each block
  console.log(monitor.uploadStats)
  console.log(monitor.downloadStats)
})

@MKPLKN MKPLKN changed the title wip: add monitor Add monitor Sep 2, 2024
@MKPLKN MKPLKN marked this pull request as ready for review September 2, 2024 07:18
@MKPLKN MKPLKN marked this pull request as ready for review September 3, 2024 18:10
lib/monitor.js Outdated Show resolved Hide resolved
lib/monitor.js Outdated Show resolved Hide resolved
lib/monitor.js Outdated Show resolved Hide resolved
lib/monitor.js Outdated Show resolved Hide resolved
lib/monitor.js Outdated Show resolved Hide resolved
lib/monitor.js Outdated Show resolved Hide resolved
@mafintosh mafintosh merged commit f0ae34e into main Sep 9, 2024
4 checks passed
@mafintosh mafintosh deleted the monitor branch September 9, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants