Skip to content

Commit

Permalink
fix: replace speedometer with throughput (#92)
Browse files Browse the repository at this point in the history
* fix: replace speedometer with throughput

* fix: update throughput
  • Loading branch information
ThaUnknown committed May 14, 2022
1 parent 08250a6 commit 642ac8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import randombytes from 'randombytes'
import RC4 from 'rc4'
import stream from 'readable-stream'
import sha1 from 'simple-sha1'
import speedometer from 'speedometer'
import throughput from 'throughput'
import arrayRemove from 'unordered-array-remove'

const debug = Debug('bittorrent-protocol')
Expand Down Expand Up @@ -109,8 +109,8 @@ class Wire extends stream.Duplex {

this.uploaded = 0
this.downloaded = 0
this.uploadSpeed = speedometer()
this.downloadSpeed = speedometer()
this.uploadSpeed = throughput()
this.downloadSpeed = throughput()

this._keepAliveInterval = null
this._timeout = null
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"rc4": "^0.1.5",
"readable-stream": "^3.6.0",
"simple-sha1": "^3.1.0",
"speedometer": "^1.1.0",
"throughput": "^1.0.1",
"unordered-array-remove": "^1.0.2"
},
"devDependencies": {
Expand Down

0 comments on commit 642ac8e

Please sign in to comment.