Files
songbird/Cargo.toml
Kyle Simpson 504b8dfaef Driver, Input: Performance & Benchmarks (#27)
* Driver Benchmarks

Benchmarks driver use cases for single packet send,
multiple packet send, float vs opus, and the cost of
head-of-queue track removal.

Mix costs for large packet counts are also included.

This is a prelude to the optimisations discussed in
#21.

* Typo in benchmark

* Place Opus packet directly into packet buffer

Cleans up some other logic surrounding this, too. Gets a 16.9% perf improvement on opus packet passthrough (sub 5us here).

* Better track removal

In theory this should be faster, but it aint. Keeping in case
reducing struct sizes down the line magically makes this
faster.

* Reduce size of Input, TrackHandle

Metadata is now boxed away. Similarly, TrackHandles are neatly Arc'd to reduce their size to pointer length (and mitigate the impact of copies if we add in more fields).
2020-12-26 23:08:35 +00:00

176 lines
3.5 KiB
TOML

[package]
authors = ["Kyle Simpson <kyleandrew.simpson@gmail.com>"]
description = "An async Rust library for the Discord voice API."
documentation = "https://docs.rs/songbird"
edition = "2018"
homepage = "https://github.com/serenity-rs/songbird"
include = ["src/**/*.rs", "Cargo.toml", "build.rs"]
keywords = ["discord", "api", "rtp", "audio"]
license = "ISC"
name = "songbird"
readme = "README.md"
repository = "https://github.com/serenity-rs/songbird.git"
version = "0.1.0"
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tracing = "0.1"
tracing-futures = "0.2"
[dependencies.async-trait]
optional = true
version = "0.1"
[dependencies.async-tungstenite]
default-features = false
features = ["tokio-runtime"]
optional = true
version = "0.9"
[dependencies.audiopus]
optional = true
version = "0.2"
[dependencies.byteorder]
optional = true
version = "1"
[dependencies.discortp]
features = ["discord-full"]
optional = true
version = "0.2"
[dependencies.flume]
optional = true
version = "0.10"
[dependencies.futures]
version = "0.3"
[dependencies.parking_lot]
optional = true
version = "0.11"
[dependencies.rand]
optional = true
version = "0.7"
[dependencies.serenity]
optional = true
default-features = false
features = ["voice", "gateway"]
git = "https://github.com/serenity-rs/serenity"
branch = "current"
[dependencies.serenity-voice-model]
optional = true
git = "https://github.com/serenity-rs/serenity"
branch = "current"
[dependencies.spin_sleep]
optional = true
version = "1"
[dependencies.streamcatcher]
optional = true
version = "0.1"
[dependencies.tokio]
optional = true
version = "0.2"
default-features = false
[dependencies.twilight-gateway]
optional = true
version = "0.2"
default-features = false
[dependencies.twilight-model]
optional = true
version = "0.2"
default-features = false
[dependencies.url]
optional = true
version = "2"
[dependencies.uuid]
optional = true
version = "0.8"
features = ["v4"]
[dependencies.xsalsa20poly1305]
optional = true
version = "0.6"
[dev-dependencies]
criterion = "0.3"
utils = { path = "utils" }
[features]
default = [
"serenity-rustls",
"driver",
"gateway",
]
gateway = [
"flume",
"parking_lot",
"tokio/sync",
]
driver = [
"async-trait",
"async-tungstenite",
"audiopus",
"byteorder",
"discortp",
"flume",
"parking_lot",
"rand",
"serenity-voice-model",
"spin_sleep",
"streamcatcher",
"tokio/blocking",
"tokio/fs",
"tokio/io-util",
"tokio/macros",
"tokio/net",
"tokio/process",
"tokio/rt-core",
"tokio/sync",
"tokio/time",
"url",
"uuid",
"xsalsa20poly1305",
]
rustls = ["async-tungstenite/tokio-rustls"]
native = ["async-tungstenite/tokio-native-tls"]
serenity-rustls = ["serenity/rustls_backend", "rustls", "gateway", "serenity-deps"]
serenity-native = ["serenity/native_tls_backend", "native", "gateway", "serenity-deps"]
twilight-rustls = ["twilight", "twilight-gateway/rustls", "rustls", "gateway"]
twilight-native = ["twilight", "twilight-gateway/native", "native", "gateway"]
twilight = ["twilight-model"]
simd-zlib = ["twilight-gateway/simd-zlib"]
stock-zlib = ["twilight-gateway/stock-zlib"]
serenity-deps = ["async-trait"]
youtube-dlc = []
builtin-queue = []
internals = []
[[bench]]
name = "base-mixing"
path = "benches/base-mixing.rs"
harness = false
[[bench]]
name = "mixing-task"
path = "benches/mixing-task.rs"
required-features = ["internals"]
harness = false
[package.metadata.docs.rs]
features = ["default", "twilight-rustls", "builtin-queue", "stock-zlib"]