Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding instrucment #762

Merged
merged 12 commits into from
Mar 1, 2024
Merged

Adding instrucment #762

merged 12 commits into from
Mar 1, 2024

Conversation

cryptoAtwill
Copy link
Contributor

Adding #[instrument] to debug topdown syncer performance issue.

@@ -44,6 +46,7 @@ fn init_tracing(opts: &options::Options) -> Option<WorkerGuard> {
fmt::Layer::new()
.json()
.with_writer(non_blocking.with_max_level(log_level))
.with_span_events(FmtSpan::CLOSE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation is a bit short in exact details, but I think if we use FmtSpan::CLOSE only like here then the generated event will also contain the total time the span was entered (+ time the span existed but was not entered).

Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, just noticed that the tests are actually failing: https://github.com/consensus-shipyard/ipc/actions/runs/8098552876/job/22132258717

Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no worries, I see this is going into the other branch where you are already fixing them.

Base automatically changed from topdown-lost-commits to main March 1, 2024 01:34
Copy link
Contributor

@fridrik01 fridrik01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -44,6 +46,7 @@ fn init_tracing(opts: &options::Options) -> Option<WorkerGuard> {
fmt::Layer::new()
.json()
.with_writer(non_blocking.with_max_level(log_level))
.with_span_events(FmtSpan::CLOSE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation is a bit short in exact details, but I think if we use FmtSpan::CLOSE only like here then the generated event will also contain the total time the span was entered (+ time the span existed but was not entered).

@cryptoAtwill cryptoAtwill merged commit 3c53858 into main Mar 1, 2024
17 checks passed
@cryptoAtwill cryptoAtwill deleted the instrument-topdown branch March 1, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants