-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCargo.toml
114 lines (106 loc) · 4.14 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
[package]
name = "radvisor"
version = "1.4.0"
authors = ["Joseph Azevedo <[email protected]>", "Bhanu Garg <[email protected]>"]
description = """\
Resource utilization monitor for Docker containers & Kubernetes pods \
that operates with fine granularity and low overhead."""
edition = "2018"
readme = "README.md"
license = "GPL-3.0-only"
repository = "https://github.com/elba-docker/radvisor"
homepage = "https://github.com/elba-docker/radvisor"
documentation = "https://github.com/elba-docker/radvisor/tree/develop/man"
keywords = ["resource-monitor", "docker", "cli", "cgroups", "kubernetes"]
categories = ["command-line-utilities"]
exclude = [
".editorconfig",
".github",
]
[package.metadata.deb]
depends = "libssl1.1 (>= 1.1.1a), libc6 (>= 2.27)"
license-file = ["./LICENSE", "0"]
extended-description="""\
Monitors & collects system resource utilization on Linux for Docker containers and Kubernetes pods \
with fine granularity and low overhead, emitting resource utilization logs in CSVY (csv + yaml) format. \
Originally, developed in Rust as a custom tool to help detect and analyze millibottlenecks in containerized online systems, \
rAdvisor runs by polling the target provider (either the local Docker daemon or the Kubernetes API server) \
every 1 second to get a list of active, running containers/pods. \
From this list, rAdvisor runs a collection thread every 50ms to get resource utilization data for each active target using Linux cgroups, \
outputting the resultant logs in /var/log/radvisor/stats."""
section = "util"
priority = "optional"
assets = [
# Docs files
["out/docs/changelog.tar.gz", "usr/share/doc/radvisor/", "644"],
["out/docs/docs.tar.gz", "usr/share/doc/radvisor/", "644"],
["out/docs/readme.tar.gz", "usr/share/doc/radvisor/", "644"],
# Manpages
["out/man/radvisor*.1.gz", "usr/share/man/man1/", "644"],
# Shell completion files
["out/completion/bash", "usr/share/bash-completion/completions/radvisor", "644"],
["out/completion/fish", "usr/share/fish/vendor_completions.d/radvisor.fish", "644"],
["out/completion/zsh", "usr/share/zsh/vendor-completions/_radvisor", "644"],
# Binary executables
["out/radvisor", "usr/bin/", "755"],
]
[lib]
name = "radvisor"
path = "src/lib.rs"
[[bin]]
name = "radvisor"
path = "src/main.rs"
[dependencies]
bus = "^2.2"
csv = "^1.1"
anyhow = "^1.0"
thiserror = "^1.0"
itoa = "^1.0"
atoi = "^0.4"
num-traits = "^0.2"
ctrlc = { version = "^3.1", features = ["termination"] }
# Use the single-threaded runtime,
# since we only really need tokio to run API network requests
# on the polling thread, and we want it to block anyways.
tokio = { version = "^1.0", features = ["rt"] }
lazy_static = "^1.4"
gethostname = "^0.2.1"
serde = { version = "^1.0", features = ["derive"] }
serde_yaml = "^0.8"
human-panic = "^1.0"
textwrap = "^0.14"
termcolor = "^1.1"
atty = "^0.2"
humantime = "^2.0"
strum = "^0.23"
strum_macros = "^0.23"
byte-unit = "^4.0"
sys-info = "^0.9"
# This can't be updated to the stable v3.x
# until Ubuntu updates the version of rustc to be at least 1.54.
# This is because feature(extended_key_value_attributes),
# which was stabilized in 1.54, is used in clap v3 (starting in beta 3):
# https://github.com/rust-lang/rust/issues/78835
# https://github.com/rust-lang/rust/pull/83366
clap = { version = "3.0.0-beta.2", default-features = false, features = [ "std", "suggestions", "color", "derive", "wrap_help" ] }
# Kubernetes-specific dependencies
k8s-openapi = { version = "^0.13.1", default-features = false, features = ["v1_22"], optional = true }
# These are stuck at v0.62
# until Ubuntu updates the version of rustc to be at least 1.56.
# This is because they all use feature(edition2021)
kube = { version = "^0.62", optional = true }
kube-runtime = { version = "^0.62", optional = true }
kube-derive = { version = "^0.62", optional = true }
# Unix-specific dependencies
[target.'cfg(unix)'.dependencies]
libc = "^0.2.80"
shiplift = { version = "^0.7", optional = true }
[features]
docker = ["shiplift"]
kubernetes = ["kube", "kube-runtime", "kube-derive", "k8s-openapi"]
default = ["docker", "kubernetes"]
[profile.release]
lto = "thin"
opt-level = 3
[workspace]
members = ["build"]