Skip to content

Commit f4a9a6b

Browse files
committed
feat: add tracing support to describt().
1 parent c96f26b commit f4a9a6b

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

Cargo.lock

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

gix-revision/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ gix-object = { version = "^0.34.0", path = "../gix-object" }
2222
gix-date = { version = "^0.7.2", path = "../gix-date" }
2323
gix-hashtable = { version = "^0.2.4", path = "../gix-hashtable" }
2424
gix-revwalk = { version = "^0.5.0", path = "../gix-revwalk" }
25+
gix-trace = { version = "^0.1.3", path = "../gix-trace" }
2526

2627
bstr = { version = "1.3.0", default-features = false, features = ["std"]}
2728
thiserror = "1.0.26"

gix-revision/fuzz/Cargo.lock

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

gix-revision/src/describe.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@ pub(crate) mod function {
168168
first_parent,
169169
}: Options<'name>,
170170
) -> Result<Option<Outcome<'name>>, Error> {
171+
let _span = gix_trace::coarse!(
172+
"gix_revision::describe()",
173+
commit = %commit,
174+
name_count = name_by_oid.len(),
175+
max_candidates,
176+
first_parent
177+
);
171178
max_candidates = max_candidates.min(MAX_CANDIDATES);
172179
if let Some(name) = name_by_oid.get(commit) {
173180
return Ok(Some(Outcome {

0 commit comments

Comments
 (0)