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

Include timings in trace messages when profiler is true #1995

Merged
merged 1 commit into from
Jan 9, 2023

Conversation

Kha
Copy link
Member

@Kha Kha commented Dec 28, 2022

Rudimentary implementation. Would be interesting to have an "expand hot path" context menu item.

image

@Kha Kha added the changelog label Dec 28, 2022
@Kha
Copy link
Member Author

Kha commented Dec 28, 2022

!bench

(collapsed := true) : m α := do
if !(← isTracingEnabledFor cls) then
k
else
let ref ← getRef
let oldTraces ← getResetTraces
let res ← observing k
addTraceNode oldTraces cls ref (← msg res) collapsed
let (res, secs) ← withSeconds <| observing k
Copy link
Member

Choose a reason for hiding this comment

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

withSeconds is being executed even when profiler is set to false. Have you checked the impact on performance?

Copy link
Member

Choose a reason for hiding this comment

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

I see you tried !bench! last week, but it seems it did not work.

@Kha
Copy link
Member Author

Kha commented Jan 4, 2023

!bench

1 similar comment
@Kha
Copy link
Member Author

Kha commented Jan 4, 2023

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit e089d1f.
There were significant changes against commit d19033e:

  Benchmark   Metric       Change
  ========================================
- stdlib      wall-clock       1% (33.3 σ)

@Kha
Copy link
Member Author

Kha commented Jan 9, 2023

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 725117e.
There were significant changes against commit d19033e:

  Benchmark   Metric       Change
  ========================================
- rbmap_1     task-clock       5% (15.6 σ)
- rbmap_1     wall-clock       5% (15.4 σ)

@gebner gebner merged commit 5ffda81 into leanprover:master Jan 9, 2023
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.

4 participants