Collect Kubernetes pod event time durations
ktime - Collect Kubernetes pod event time durations
Usage: ktime [OPTIONS] <COMMAND>
Commands:
apply Apply the Kubernetes manifest file containing the pod definition and collect the pod event time durations
collect Collect the pod event time durations of an existing Kubernetes pod
help Print this message or the help of the given subcommand(s)
Options:
-v, --verbose... Increase logging verbosity
-q, --quiet... Decrease logging verbosity
-h, --help Print help
-V, --version Print versionCollect the pod event time durations of an existing Kubernetes pod:
ktime collect --pod my-pod # default namespace
ktime collect --pod my-pod --namespace my-namespaceApply the Kubernetes manifest file containing the pod definition and collect the pod event time durations:
ktime apply --file my-pod.yamlArchives of pre-compiled binaries for ktime are available for Windows, macOS and Linux.
brew install clowdhaus/taps/ktimecargo install ktimektime is written in Rust, so you'll need to grab a Rust installation in order to compile it.
ktime compiles with Rust 1.79.0 (stable) or newer. In general, ktime tracks the latest stable release of the Rust compiler.
To build ktime:
git clone https://github.com/clowdhaus/ktime
cd ktime
cargo build --release
./target/release/ktime --version
0.1.0ktime uses Rust stable for production builds, but nightly for local development for formatting and linting. It is not a requirement to use nightly, but if running fmt you may see a few warnings on certain features only being available on nightly.
Build the project to pull down dependencies and ensure everything is setup properly:
cargo buildTo format the codebase:
If using nightly to use features defined in rustfmt.toml, run the following:
cargo +nightly fmt --allIf using stable, run the following:
cargo fmt --allTo execute lint checks:
cargo clippy --all-targets --all-featuresTo run ktime locally for development:
cargo runTo execute the tests provided, run the following from the project root directory:
cargo test --all