mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-23 11:45:25 +00:00
2a8c93bf0f
This change adds an optional feature which allows to track how much
time was spent inside locks on connections, as well as which other
tasks held the lock (in case there is lock contention).
This makes it easier to determine which code path are currently not
as non-blocking as they should be.
Examples of output:
```
Feb 04 22:05:42.293 WARN quinn::mutex: Utilizing the connection for poll took 165.2318ms
```
```
Feb 04 22:05:42.128 WARN quinn::mutex: Locking the connection for poll took 1.1284ms. Last owners: [("SendStream::poll_write", 7.6µs), ("SendStream::poll_write", 46.4µs), ("SendStream::poll_write", 792.8µs), ("drop", 100ns), ("clone", 100ns), ("OpenUni::next", 1.3µs), ("clone", 295.2µs), ("poll", 14.1546ms), ("drop", 100ns), ("drop", 100ns), ("drop", 439.2µs), ("poll", 9.7657ms), ("clone", 0ns), ("clone", 0ns), ("clone", 100ns), ("connecting", 308.3µs), ("poll", 30.402ms), ("poll", 4.1406ms), ("clone", 100ns)]
```
85 lines
2.3 KiB
TOML
85 lines
2.3 KiB
TOML
[package]
|
|
name = "quinn"
|
|
version = "0.6.1"
|
|
authors = ["Benjamin Saunders <ben.e.saunders@gmail.com>", "Dirkjan Ochtman <dirkjan@ochtman.nl>"]
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/djc/quinn"
|
|
description = "QUIC transport protocol implementation for Tokio"
|
|
readme = "../README.md"
|
|
keywords = ["quic"]
|
|
categories = [ "network-programming", "asynchronous" ]
|
|
workspace = ".."
|
|
edition = "2018"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
|
|
[features]
|
|
default = ["native-certs", "certificate-transparency", "tls-rustls"]
|
|
# Use Google's list of CT logs to enable certificate transparency checks
|
|
certificate-transparency = ["proto/certificate-transparency"]
|
|
# Records how long locks are held, and warns if they are held >= 1ms
|
|
lock_tracking = []
|
|
# Trust the contents of the OS certificate store by default
|
|
native-certs = ["proto/native-certs"]
|
|
tls-rustls = ["rustls", "webpki", "proto/tls-rustls"]
|
|
|
|
[badges]
|
|
codecov = { repository = "djc/quinn" }
|
|
maintenance = { status = "experimental" }
|
|
|
|
[dependencies]
|
|
bytes = "1"
|
|
futures = "0.3.8"
|
|
libc = "0.2.69"
|
|
mio = { version = "0.7.7", features = ["net"] }
|
|
proto = { package = "quinn-proto", path = "../quinn-proto", version = "0.6.1" }
|
|
rustls = { version = "0.19", features = ["quic"], optional = true }
|
|
socket2 = "0.3"
|
|
thiserror = "1.0.21"
|
|
tracing = "0.1.10"
|
|
tokio = { version = "1.0.1", features = ["net", "rt", "rt-multi-thread", "time"] }
|
|
webpki = { version = "0.21", optional = true }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
lazy_static = "1"
|
|
|
|
[dev-dependencies]
|
|
anyhow = "1.0.22"
|
|
crc = "1.8.1"
|
|
bencher = "0.1.5"
|
|
directories-next = "2"
|
|
rand = "0.8"
|
|
rcgen = "0.8"
|
|
structopt = "0.3.0"
|
|
tokio = { version = "1.0.1", features = ["rt", "time", "macros"] }
|
|
tracing-subscriber = { version = "0.2.5", default-features = false, features = ["env-filter", "fmt", "ansi", "chrono"]}
|
|
tracing-futures = { version = "0.2.0", default-features = false, features = ["std-future"] }
|
|
unwrap = "1.2.1"
|
|
url = "2"
|
|
|
|
[[example]]
|
|
name = "server"
|
|
required-features = ["tls-rustls"]
|
|
|
|
[[example]]
|
|
name = "client"
|
|
required-features = ["tls-rustls"]
|
|
|
|
[[example]]
|
|
name = "insecure_connection"
|
|
required-features = ["rustls/dangerous_configuration"]
|
|
|
|
[[example]]
|
|
name = "single_socket"
|
|
required-features = ["tls-rustls"]
|
|
|
|
[[example]]
|
|
name = "connection"
|
|
required-features = ["tls-rustls"]
|
|
|
|
[[bench]]
|
|
name = "bench"
|
|
harness = false
|
|
required-features = ["tls-rustls"]
|