mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-08-24 04:16:30 +00:00
This adds the ability to run with `--network_start_zeroed` or the `start_zeroed` config option, which will zero out the total network usage so that bottom starts with it at zero, rather than the total network usage reported by the OS since boot.
Config JSON Schema
Generation
These are automatically generated from the code using schemars. The schemars
derives are locked behind the generate_schema feature flag to avoid building unnecessary code for normal builds.
Meanwhile, the generator itself lives in a separate scripts/schema_gen helper crate. You can
generate them like so:
# Will print out to stdout
cargo run --manifest-path scripts/schema_gen/Cargo.toml
# e.g. for nightly
cargo run --manifest-path scripts/schema_gen/Cargo.toml > schema/nightly/bottom.json
# e.g. for a specific version
cargo run --manifest-path scripts/schema_gen/Cargo.toml -- 0.12.0 > schema/v0.12.0/bottom.json
Alternatively, run the scripts/schema/generate.sh script (for stable releases) or scripts/schema/nightly.sh
(for nightly), which does all of this for you.
Publication
To publish these schemas:
Stable
- Run
scripts/schema/generate.sh <YOUR_VERSION>. - Make a PR and merge it.
- Then, make a PR to schemastore to update the catalog. Here's an example of a PR.
Nightly
- Run
scripts/schema/nightly.sh. - Make a PR and merge it.