Skip to content

Commit

Permalink
feat: gix --trace to also print tree-like instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Jun 16, 2023
1 parent 3cffa26 commit c494cfd
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 15 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ default = ["max"]

## Everything, all at once.
##
## As fast as possible, with TUI progress, progress line rendering with auto-configuration, all transports based on their most mature implementation (HTTP), all `ein` tools, CLI colors and local-time support, JSON output, regex support for rev-specs.
## As fast as possible, tracing, with TUI progress, progress line rendering with auto-configuration, all transports based on their most mature implementation (HTTP), all `ein` tools, CLI colors and local-time support, JSON output, regex support for rev-specs.
max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl"]

## Like `max`, but only Rust is allowed.
Expand All @@ -44,12 +44,12 @@ max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl
max-pure = ["max-control", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "http-client-reqwest", "gitoxide-core-blocking-client" ]

## Like `max`, but with more control for configuration. See the *Package Maintainers* headline for more information.
max-control = ["fast-safe", "pretty-cli", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/regex" ]
max-control = ["tracing", "fast-safe", "pretty-cli", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/regex" ]

## All of the good stuff, with less fanciness for smaller binaries.
##
## As fast as possible, progress line rendering, all transports based on their most mature implementation (HTTP), all `ein` tools, CLI colors and local-time support, JSON output.
lean = ["fast", "pretty-cli", "http-client-curl", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "gitoxide-core-blocking-client", "prodash-render-line" ]
lean = ["fast", "tracing", "pretty-cli", "http-client-curl", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "gitoxide-core-blocking-client", "prodash-render-line" ]

## The smallest possible build, best suitable for small single-core machines.
##
Expand All @@ -67,7 +67,7 @@ small = ["pretty-cli", "gix-features/rustsha1", "gix-features/zlib-rust-backend"
##
## Due to async client-networking not being implemented for most transports, this one supports only the 'git+tcp' and HTTP transport.
## It uses, however, a fully asynchronous networking implementation which can serve a real-world example on how to implement custom async transports.
lean-async = ["fast", "pretty-cli", "gitoxide-core-tools", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-async-client", "prodash-render-line"]
lean-async = ["fast", "tracing", "pretty-cli", "gitoxide-core-tools", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-async-client", "prodash-render-line"]

#! ### Package Maintainers
#! `*-control` features leave it to you to configure C libraries, involving choices for `zlib`, ! hashing and transport implementation.
Expand Down Expand Up @@ -105,6 +105,9 @@ fast = ["gix/max-performance", "gix/comfort"]
## If disabled, the binary will be visibly smaller.
fast-safe = ["gix/max-performance-safe", "gix/comfort"]

## Enable tracing in `gitoxide-core`.
tracing = ["dep:tracing-forest", "dep:tracing-subscriber", "dep:tracing", "gix-features/tracing", "gix-features/tracing-detail" ]

## Use `clap` 3.0 to build the prettiest, best documented and most user-friendly CLI at the expense of binary size.
## Provides a terminal user interface for detailed and exhaustive progress.
## Provides a line renderer for leaner progress display, without the need for a full-blown TUI.
Expand Down Expand Up @@ -168,6 +171,11 @@ env_logger = { version = "0.10.0", default-features = false }
crosstermion = { version = "0.11.0", optional = true, default-features = false }
futures-lite = { version = "1.12.0", optional = true, default-features = false, features = ["std"] }

# for 'tracing'
tracing-forest = { version = "0.1.5", features = ["serde"], optional = true }
tracing-subscriber = { version = "0.3.17", optional = true }
tracing = { version = "0.1.37", optional = true }

# for progress
owo-colors = "3.5.0"
tabled = { version = "0.10.0", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions gitoxide-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ estimate-hours = ["dep:itertools", "dep:fs-err", "dep:crossbeam-channel", "dep:s
query = ["dep:rusqlite"]
## Run algorithms on a corpus of repositories and store their results for later comparison and intelligence gathering.
## *Note that* `organize` we need for finding git repositories fast.
corpus = ["dep:rusqlite", "dep:sysinfo", "organize", "dep:crossbeam-channel", "dep:tracing-forest", "dep:serde_json", "dep:tracing-subscriber", "dep:tracing"]
corpus = [ "dep:rusqlite", "dep:sysinfo", "organize", "dep:crossbeam-channel", "dep:serde_json", "dep:tracing-forest", "dep:tracing-subscriber", "dep:tracing" ]

#! ### Mutually Exclusive Networking
#! If both are set, _blocking-client_ will take precedence, allowing `--all-features` to be used.
Expand Down Expand Up @@ -73,8 +73,8 @@ rusqlite = { version = "0.29.0", optional = true, features = ["bundled"] }

# for 'corpus'
sysinfo = { version = "0.29.2", optional = true, default-features = false }
tracing-forest = { version = "0.1.5", features = ["serde"], optional = true }
serde_json = { version = "1.0.65", optional = true }
tracing-forest = { version = "0.1.5", features = ["serde"], optional = true }
tracing-subscriber = { version = "0.3.17", optional = true }
tracing = { version = "0.1.37", optional = true }

Expand Down

0 comments on commit c494cfd

Please sign in to comment.