-
Notifications
You must be signed in to change notification settings - Fork 959
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: memory based connection limits
Implements memory-based connection limits where the user can specify an absolute or a relative limit of the process' memory usage in relation to the available system memory. Related: #4252. Pull-Request: #4281.
- Loading branch information
1 parent
188b70e
commit b5d9932
Showing
11 changed files
with
633 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## 0.1.0 - unreleased | ||
|
||
- Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "libp2p-memory-connection-limits" | ||
edition = "2021" | ||
rust-version = { workspace = true } | ||
description = "Memory usage based connection limits for libp2p." | ||
version = "0.1.0" | ||
license = "MIT" | ||
repository = "https://github.com/libp2p/rust-libp2p" | ||
keywords = ["peer-to-peer", "libp2p", "networking"] | ||
categories = ["network-programming", "asynchronous"] | ||
|
||
[dependencies] | ||
memory-stats = { version = "1", features = ["always_use_statm"] } | ||
libp2p-core = { workspace = true } | ||
libp2p-swarm = { workspace = true } | ||
libp2p-identity = { workspace = true, features = ["peerid"] } | ||
log = "0.4" | ||
sysinfo = "0.29" | ||
void = "1" | ||
|
||
[dev-dependencies] | ||
async-std = { version = "1.12.0", features = ["attributes"] } | ||
libp2p-identify = { workspace = true } | ||
libp2p-swarm-derive = { path = "../../swarm-derive" } | ||
libp2p-swarm-test = { path = "../../swarm-test" } | ||
rand = "0.8.5" |
Oops, something went wrong.