Skip to content

Commit c494cfd

Browse files
committed
feat: gix --trace to also print tree-like instrumentation
1 parent 3cffa26 commit c494cfd

File tree

10 files changed

+135
-15
lines changed

10 files changed

+135
-15
lines changed

Diff for: Cargo.lock

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+12-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ default = ["max"]
3232

3333
## Everything, all at once.
3434
##
35-
## 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.
35+
## 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.
3636
max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl"]
3737

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

4646
## Like `max`, but with more control for configuration. See the *Package Maintainers* headline for more information.
47-
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" ]
47+
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" ]
4848

4949
## All of the good stuff, with less fanciness for smaller binaries.
5050
##
5151
## 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.
52-
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" ]
52+
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" ]
5353

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

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

108+
## Enable tracing in `gitoxide-core`.
109+
tracing = ["dep:tracing-forest", "dep:tracing-subscriber", "dep:tracing", "gix-features/tracing", "gix-features/tracing-detail" ]
110+
108111
## Use `clap` 3.0 to build the prettiest, best documented and most user-friendly CLI at the expense of binary size.
109112
## Provides a terminal user interface for detailed and exhaustive progress.
110113
## Provides a line renderer for leaner progress display, without the need for a full-blown TUI.
@@ -168,6 +171,11 @@ env_logger = { version = "0.10.0", default-features = false }
168171
crosstermion = { version = "0.11.0", optional = true, default-features = false }
169172
futures-lite = { version = "1.12.0", optional = true, default-features = false, features = ["std"] }
170173

174+
# for 'tracing'
175+
tracing-forest = { version = "0.1.5", features = ["serde"], optional = true }
176+
tracing-subscriber = { version = "0.3.17", optional = true }
177+
tracing = { version = "0.1.37", optional = true }
178+
171179
# for progress
172180
owo-colors = "3.5.0"
173181
tabled = { version = "0.10.0", default-features = false }

Diff for: gitoxide-core/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ estimate-hours = ["dep:itertools", "dep:fs-err", "dep:crossbeam-channel", "dep:s
2323
query = ["dep:rusqlite"]
2424
## Run algorithms on a corpus of repositories and store their results for later comparison and intelligence gathering.
2525
## *Note that* `organize` we need for finding git repositories fast.
26-
corpus = ["dep:rusqlite", "dep:sysinfo", "organize", "dep:crossbeam-channel", "dep:tracing-forest", "dep:serde_json", "dep:tracing-subscriber", "dep:tracing"]
26+
corpus = [ "dep:rusqlite", "dep:sysinfo", "organize", "dep:crossbeam-channel", "dep:serde_json", "dep:tracing-forest", "dep:tracing-subscriber", "dep:tracing" ]
2727

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

7474
# for 'corpus'
7575
sysinfo = { version = "0.29.2", optional = true, default-features = false }
76-
tracing-forest = { version = "0.1.5", features = ["serde"], optional = true }
7776
serde_json = { version = "1.0.65", optional = true }
77+
tracing-forest = { version = "0.1.5", features = ["serde"], optional = true }
7878
tracing-subscriber = { version = "0.3.17", optional = true }
7979
tracing = { version = "0.1.37", optional = true }
8080

0 commit comments

Comments
 (0)