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

Measure load times; display on graph #64

Closed
tfiers opened this issue Jan 9, 2023 · 10 comments
Closed

Measure load times; display on graph #64

tfiers opened this issue Jan 9, 2023 · 10 comments
Labels
feature An enhancement to src/ visible to end-users
Milestone

Comments

@tfiers
Copy link
Owner

tfiers commented Jan 9, 2023

from

for installed in current project only
t₀=time(); @eval using $module; loadtime=time()-t₀
Just go down list (or up list rather. 'topological sort')
And done. Add to graph nodes (maybe fade the lower ones. Or ooh flame 🔥 color scheme!)

@tfiers tfiers added the feature An enhancement to src/ visible to end-users label Jan 9, 2023
@tfiers tfiers mentioned this issue Jan 9, 2023
@tfiers tfiers added this to the v0.5 milestone Jan 11, 2023
@tfiers
Copy link
Owner Author

tfiers commented Jan 12, 2023

Though hm I think you can't import a package that is, yes, in Manifest, but not in Projecr.

So maybe we run @time_imports in a subprocess and parse its text output 🤷

@tfiers
Copy link
Owner Author

tfiers commented Jan 12, 2023

Relevant:

the macro just sets the Base.TIMING_IMPORTS flag.
(in stdlib, InteractiveUtils, macros.jl)

searching src:

My question is: is the last time reported the total time? Or of the root pkg only.
(It's not in docstr)

Relevant PRs:

(the src for latest commit above is different than code in PR). So it's been rewritten from 1.8 to 1.9 or .10

@tfiers
Copy link
Owner Author

tfiers commented Jan 12, 2023

Again from src of main PR (https://github.com/JuliaLang/julia/pull/41612/files),
the test:

  redirect_stdout(buf) do
      @eval @time_imports using Foo3242
  end

So we don't need a sep process to read printed timings.
But I still will, cause some subdeps might already be imported.
(Confirmed in repl: re-running, e.g, @time_imports using UnicodePlots prints nothing the second time)

@tfiers
Copy link
Owner Author

tfiers commented Jan 12, 2023

And no, the numbers are not cumulative:

(also not the last one -- notwithstanding what the example might imply; CSV really takes two seconds on its own)

@tfiers
Copy link
Owner Author

tfiers commented Jan 12, 2023

Proof of concept: 9ffab8e

@tfiers
Copy link
Owner Author

tfiers commented Jan 12, 2023

Next step is integrating into codebase.
A newline in the nodes (add an actual label)
maybe html node contents?

and then API.. a flag is fine (no sep function needed)

@tfiers
Copy link
Owner Author

tfiers commented Jan 12, 2023

  • Check for at least Julia 1.8

@tfiers
Copy link
Owner Author

tfiers commented Jan 13, 2023

On integration:
I tried a start -- with

some files now capitalized; no more internals/ dir.
But that looked so messy

@tfiers
Copy link
Owner Author

tfiers commented Jan 13, 2023

  • Try adding manually in webapp and looking at Graphviz example gallery

@tfiers
Copy link
Owner Author

tfiers commented Jan 15, 2023

So this got done in 95a1465.
[this and below comments moved to

]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature An enhancement to src/ visible to end-users
Projects
None yet
Development

No branches or pull requests

1 participant