Skip to content

Commit 43914a1

Browse files
committed
monitor resource consumption on linux
1 parent 04dae50 commit 43914a1

14 files changed

Lines changed: 510 additions & 8 deletions

File tree

.github/buildomat/build-and-test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ cargo --version
2424
rustc --version
2525
curl -sSfL --retry 10 https://get.nexte.st/"$NEXTEST_VERSION"/"$1" | gunzip | tar -xvf - -C ~/.cargo/bin
2626

27+
cargo build --release -p ci-resource-usage
28+
bmat process start ci-resource-usage target/release/ci-resource-usage /var/tmp/ci-resource-usage.csv
29+
2730
#
2831
# Set up a custom temporary directory within whatever one we were given so that
2932
# we can check later whether we left detritus around.

.github/buildomat/jobs/build-and-test-helios.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "build-and-test (helios)"
44
#: variety = "basic"
5-
#: target = "helios-2.0-32c256gb"
5+
#: target = "helios-2.0-20260324-16c128gb"
66
#: rust_toolchain = true
77
#: output_rules = [
88
#: "%/work/*",
@@ -13,6 +13,7 @@
1313
#: "%/var/tmp/omicron_tmp/**/*",
1414
#: "!/var/tmp/omicron_tmp/crdb-base*",
1515
#: "!/var/tmp/omicron_tmp/rustc*",
16+
#: "%/var/tmp/ci-resource-usage.csv",
1617
#: ]
1718
#: access_repos = [
1819
#: "oxidecomputer/dendrite"

.github/buildomat/jobs/build-and-test-linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#: "%/var/tmp/omicron_tmp/**/*",
1313
#: "!/var/tmp/omicron_tmp/crdb-base*",
1414
#: "!/var/tmp/omicron_tmp/rustc*",
15+
#: "%/var/tmp/ci-resource-usage.csv",
1516
#: ]
1617
#: access_repos = [
1718
#: "oxidecomputer/dendrite",

.github/buildomat/jobs/check-features.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
#:
33
#: name = "check-features (helios)"
44
#: variety = "basic"
5-
#: target = "helios-2.0"
5+
#: target = "helios-2.0-20260324"
66
#: rust_toolchain = true
77
#: output_rules = [
88
#: "/out/*",
9+
#: "%/var/tmp/ci-resource-usage.csv",
910
#: ]
1011

1112
# Run the check-features `xtask` on illumos, testing compilation of feature combinations.
@@ -20,6 +21,9 @@ source .github/buildomat/ci-env.sh
2021
cargo --version
2122
rustc --version
2223

24+
cargo build --release -p ci-resource-usage
25+
bmat process start ci-resource-usage target/release/ci-resource-usage /var/tmp/ci-resource-usage.csv
26+
2327
#
2428
# Set up our PATH for use with this workspace.
2529
#

.github/buildomat/jobs/clippy.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
#:
33
#: name = "clippy (helios)"
44
#: variety = "basic"
5-
#: target = "helios-2.0"
5+
#: target = "helios-2.0-20260324"
66
#: rust_toolchain = true
7-
#: output_rules = []
7+
#: output_rules = [
8+
#: "%/var/tmp/ci-resource-usage.csv",
9+
#: ]
810

911
# Run clippy on illumos (not just other systems) because a bunch of our code
1012
# (that we want to check) is conditionally-compiled on illumos only.
@@ -28,6 +30,9 @@ source .github/buildomat/ci-env.sh
2830
cargo --version
2931
rustc --version
3032

33+
cargo build --release -p ci-resource-usage
34+
bmat process start ci-resource-usage target/release/ci-resource-usage /var/tmp/ci-resource-usage.csv
35+
3136
banner prerequisites
3237
ptime -m bash ./tools/install_builder_prerequisites.sh -y
3338

.github/buildomat/jobs/omicron-common.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
#:
33
#: name = "omicron-common (helios)"
44
#: variety = "basic"
5-
#: target = "helios-2.0"
5+
#: target = "helios-2.0-20260324"
66
#: rust_toolchain = true
7-
#: output_rules = []
7+
#: output_rules = [
8+
#: "%/var/tmp/ci-resource-usage.csv",
9+
#: ]
810

911
# Verify that omicron-common builds successfully when used as a dependency
1012
# in an external project. It must not leak anything that requires an external
@@ -20,6 +22,9 @@ source .github/buildomat/ci-env.sh
2022
cargo --version
2123
rustc --version
2224

25+
cargo build --release -p ci-resource-usage
26+
bmat process start ci-resource-usage target/release/ci-resource-usage /var/tmp/ci-resource-usage.csv
27+
2328
cd /tmp
2429
cargo new --lib test-project
2530
cd test-project

.github/buildomat/jobs/package.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
#:
33
#: name = "helios / package"
44
#: variety = "basic"
5-
#: target = "helios-2.0-16c64gb"
5+
#: target = "helios-2.0-20260324-16c64gb"
66
#: rust_toolchain = true
77
#: output_rules = [
88
#: "=/work/package.tar.gz",
9+
#: "%/var/tmp/ci-resource-usage.csv",
910
#: ]
1011
#:
1112

@@ -19,6 +20,9 @@ source .github/buildomat/ci-env.sh
1920
cargo --version
2021
rustc --version
2122

23+
cargo build --release -p ci-resource-usage
24+
bmat process start ci-resource-usage target/release/ci-resource-usage /var/tmp/ci-resource-usage.csv
25+
2226
WORK=/work
2327
pfexec mkdir -p $WORK && pfexec chown $USER $WORK
2428

.github/buildomat/jobs/tuf-repo.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "helios / build TUF repo"
44
#: variety = "basic"
5-
#: target = "helios-2.0-16c128gb"
5+
#: target = "helios-2.0-20260324-16c128gb"
66
#: rust_toolchain = true
77
#: output_rules = [
88
#: "=/work/manifest.toml",
@@ -12,6 +12,7 @@
1212
#: "=/work/incorporation.p5m",
1313
#: "=/work/incorporation.p5p",
1414
#: "%/work/*.log",
15+
#: "%/var/tmp/ci-resource-usage.csv",
1516
#: ]
1617
#: access_repos = [
1718
#: "oxidecomputer/amd-firmware",
@@ -61,6 +62,9 @@ source .github/buildomat/ci-env.sh
6162
cargo --version
6263
rustc --version
6364

65+
cargo build --release -p ci-resource-usage
66+
bmat process start ci-resource-usage target/release/ci-resource-usage /var/tmp/ci-resource-usage.csv
67+
6468
# Before we do _anything_, quickly check that Cargo.lock is properly locked.
6569
# Most of our tools (including releng!) eventually call `cargo xtask`, which
6670
# runs without `--locked` and will update the lockfile.

Cargo.lock

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ members = [
3232
"cockroach-metrics",
3333
"common",
3434
"dev-tools/cert-dev",
35+
"dev-tools/ci-resource-usage",
3536
"dev-tools/clickana",
3637
"dev-tools/clickhouse-cluster-dev",
3738
"dev-tools/ch-dev",

0 commit comments

Comments
 (0)