# \#profiling

**URL:** https://discourse.julialang.org/tag/profiling/335.md?page=1

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 2

---

## [Profiling in VSCode shows blank tab on first run?](https://discourse.julialang.org/t/profiling-in-vscode-shows-blank-tab-on-first-run/100492)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 2\
**Last updated:** [June 17, 2023, 6:10pm UTC](https://discourse.julialang.org/t/profiling-in-vscode-shows-blank-tab-on-first-run/100492 "2023-06-17T18:10:49Z")

</div>

Hi everyone, In the last few weeks, I have found that the @profview macro from the VSCode extension shows a blank tab the first time I run it, and then gives me the flame graph on the second run. Does it happen to anyon…

---

## [FlameGraph ProfileView not showing matrix operations](https://discourse.julialang.org/t/flamegraph-profileview-not-showing-matrix-operations/100359)

<div class="topic-metadata">

**Author:** [@hsgg](https://discourse.julialang.org/u/hsgg)\
**Replies:** 2\
**Last updated:** [June 15, 2023, 9:54pm UTC](https://discourse.julialang.org/t/flamegraph-profileview-not-showing-matrix-operations/100359 "2023-06-15T21:54:04Z")

</div>

Hi, I am using FlameGraphs.jl and ProfileView.jl to profile my code with matrix operations. I am fairly new to these profiling tools. On MacOS M1 the matrix operations are not showing up in the flame graph. Here is a MW…

---

## [ProfileView and Benchmark Disagree on Timing for Simple Matrix Multiplication](https://discourse.julialang.org/t/profileview-and-benchmark-disagree-on-timing-for-simple-matrix-multiplication/96069)

<div class="topic-metadata">

**Author:** [@andrew-saydjari](https://discourse.julialang.org/u/andrew-saydjari)\
**Replies:** 13\
**Last updated:** [March 28, 2023, 3:28am UTC](https://discourse.julialang.org/t/profileview-and-benchmark-disagree-on-timing-for-simple-matrix-multiplication/96069 "2023-03-28T03:28:00Z")

</div>

I am trying to benchmark and improve the cost for matrix multiplication for a custom type I have implemented. But, in trying to do that, I have become confused about the profile and benchmarking results for a simple matr…

---

## [Profiling memory allocations](https://discourse.julialang.org/t/profiling-memory-allocations/96385)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 1\
**Last updated:** [March 21, 2023, 1:12pm UTC](https://discourse.julialang.org/t/profiling-memory-allocations/96385 "2023-03-21T13:12:10Z")

</div>

I have written some code in functional/immutable style, with the aim of not allocating any memory (on the heap). The code is weird because this is a mock-up of something I then want to create a macro to generate from si…

---

## [Using the Intel VTune Profiler with julia](https://discourse.julialang.org/t/using-the-intel-vtune-profiler-with-julia/34327)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 27\
**Last updated:** [December 19, 2022, 9:14pm UTC](https://discourse.julialang.org/t/using-the-intel-vtune-profiler-with-julia/34327 "2022-12-19T21:14:43Z")

</div>

Hi all, I’m trying to profile the following piece of Julia code, taken from ProfileView.jl, using the external Intel VTune Profiler. Concretely, the code is # vtune.jl function profile\_test(n) for i = 1:n A…

---

## [Use middleware to log time it takes client to receive response](https://discourse.julialang.org/t/use-middleware-to-log-time-it-takes-client-to-receive-response/91250)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 4\
**Last updated:** [December 7, 2022, 6:24pm UTC](https://discourse.julialang.org/t/use-middleware-to-log-time-it-takes-client-to-receive-response/91250 "2022-12-07T18:24:05Z")

</div>

I’m trying to understand how to use HTTP.jl’s middleware to log the amount of time between two distinct events: The server started sending the response The client received it The following MWE doesn’t accomplish this,…

---

## [Silhouette coefficient calculation](https://discourse.julialang.org/t/silhouette-coefficient-calculation/89861)

<div class="topic-metadata">

**Author:** [@Shayan](https://discourse.julialang.org/u/Shayan)\
**Replies:** 5\
**Last updated:** [November 7, 2022, 1:49pm UTC](https://discourse.julialang.org/t/silhouette-coefficient-calculation/89861 "2022-11-07T13:49:47Z")

</div>

I’ve written a Julia script to calculate the silhouette coefficient of the ClusterAnalysis.jl Kmeans’ result, but it’s highly inefficient and slow. I’ve written the procedure for both common and simplified versions of th…

---

## [Significant time spent in type inference in profiler flame graphs](https://discourse.julialang.org/t/significant-time-spent-in-type-inference-in-profiler-flame-graphs/89094)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 4\
**Last updated:** [October 22, 2022, 3:58am UTC](https://discourse.julialang.org/t/significant-time-spent-in-type-inference-in-profiler-flame-graphs/89094 "2022-10-22T03:58:45Z")

</div>

I am currently profiling the search speed of SymbolicRegression.jl. In particular I am attempting to speed up this PR, which integrates the package with DynamicExpressions.jl. I am using the following code for profiling…

---

## [How can I measure the time to compile each function in a package?](https://discourse.julialang.org/t/how-can-i-measure-the-time-to-compile-each-function-in-a-package/85749)

<div class="topic-metadata">

**Author:** [@guilhermebodin](https://discourse.julialang.org/u/guilhermebodin)\
**Replies:** 0\
**Last updated:** [August 14, 2022, 11:00pm UTC](https://discourse.julialang.org/t/how-can-i-measure-the-time-to-compile-each-function-in-a-package/85749 "2022-08-14T23:00:43Z")

</div>

When I profile the first time to do something in a package I find out that it is making a lot of LLVM passes, it is possible to profile on which functions these LLVM passes spend the most time?

---

## [How reliable are the warning flags in the vscode profile viewer?](https://discourse.julialang.org/t/how-reliable-are-the-warning-flags-in-the-vscode-profile-viewer/83325)

<div class="topic-metadata">

**Author:** [@benninkrs](https://discourse.julialang.org/u/benninkrs)\
**Replies:** 2\
**Last updated:** [June 27, 2022, 7:14am UTC](https://discourse.julialang.org/t/how-reliable-are-the-warning-flags-in-the-vscode-profile-viewer/83325 "2022-06-27T07:14:23Z")

</div>

I’m profiling a function using the vscode-julia @profview macro. When I do this some lines in the function are flagged as dynamic dispatch which I have a hard time believing, since according to @code\_warntype the argumen…

---

## [Profiling compilation of a large generated expression?](https://discourse.julialang.org/t/profiling-compilation-of-a-large-generated-expression/83179)

<div class="topic-metadata">

**Author:** [@iago-lito](https://discourse.julialang.org/u/iago-lito)\
**Replies:** 4\
**Last updated:** [June 22, 2022, 11:32am UTC](https://discourse.julialang.org/t/profiling-compilation-of-a-large-generated-expression/83179 "2022-06-22T11:32:34Z")

</div>

Hi @Julia, The team I’m working with is writing a simulation package, with a core dudt!(du, u, parameters, t) function given as an argument to ODEProblem and solve from DifferentialEquations. The code in dudt! is comple…

---

## [How to understand the ProfileView output](https://discourse.julialang.org/t/how-to-understand-the-profileview-output/79968)

<div class="topic-metadata">

**Author:** [@Himbeersternchen](https://discourse.julialang.org/u/Himbeersternchen)\
**Replies:** 3\
**Last updated:** [April 29, 2022, 9:52am UTC](https://discourse.julialang.org/t/how-to-understand-the-profileview-output/79968 "2022-04-29T09:52:54Z")

</div>

Hello Everyone, Similar as this topic, i want to understand the profileview output. The test code is as Following: init() = begin n = 250 a1 = Vector{Vector{Float64}}(undef, n) for i in 1:n a1\[i\] …

---

## [Can the output of --track-allocation be trusted with multi-threading enabled?](https://discourse.julialang.org/t/can-the-output-of-track-allocation-be-trusted-with-multi-threading-enabled/78744)

<div class="topic-metadata">

**Author:** [@krcools](https://discourse.julialang.org/u/krcools)\
**Replies:** 9\
**Last updated:** [March 30, 2022, 6:07pm UTC](https://discourse.julialang.org/t/can-the-output-of-track-allocation-be-trusted-with-multi-threading-enabled/78744 "2022-03-30T18:07:43Z")

</div>

Below the output of --track-allocation. The first time when the code is ran with a single thread, the second time when the work is divided and the code is called from 8 threads. Is this output to be trusted? If so where …

---

## [Extremely slow n-th root of float](https://discourse.julialang.org/t/extremely-slow-n-th-root-of-float/78534)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 11\
**Last updated:** [March 27, 2022, 5:23am UTC](https://discourse.julialang.org/t/extremely-slow-n-th-root-of-float/78534 "2022-03-27T05:23:18Z")

</div>

I’m benchmarking an algorithm translated from Fortran, doing something similar to Expokit.expmv – evaluate the result of exponentiation a matrix and applying it to a vector, by expanding the exp into a polynomial series. …

---

## [How to check whether profiling is supported](https://discourse.julialang.org/t/how-to-check-whether-profiling-is-supported/77882)

<div class="topic-metadata">

**Author:** [@Uroc327](https://discourse.julialang.org/u/Uroc327)\
**Replies:** 0\
**Last updated:** [March 14, 2022, 5:33pm UTC](https://discourse.julialang.org/t/how-to-check-whether-profiling-is-supported/77882 "2022-03-14T17:33:10Z")

</div>

How can I check whether a julia binary was built with USE\_PERF\_JITEVENTS=1? It seems to be default on linux platforms, but is there any way to query this? I wonder if I have to build julia from source for profiling or i…

---

## [Profiling Revised Base](https://discourse.julialang.org/t/profiling-revised-base/76599)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 2\
**Last updated:** [February 17, 2022, 3:14am UTC](https://discourse.julialang.org/t/profiling-revised-base/76599 "2022-02-17T03:14:49Z")

</div>

After running Revise.track(Base) and editing files in Base, @profile & Profile.print() give wrong line numbers. Is there a way around this?

---

## [Efficient calculation of many complex Lorentzians on a large array](https://discourse.julialang.org/t/efficient-calculation-of-many-complex-lorentzians-on-a-large-array/76150)

<div class="topic-metadata">

**Author:** [@mgreifenstein](https://discourse.julialang.org/u/mgreifenstein)\
**Replies:** 24\
**Last updated:** [February 10, 2022, 2:45pm UTC](https://discourse.julialang.org/t/efficient-calculation-of-many-complex-lorentzians-on-a-large-array/76150 "2022-02-10T14:45:25Z")

</div>

Dear Julia community, As obvious from the forum I’m posting in, I am indeed new to Julia but already love it. By education, I am an engineer with a PhD focusing on laser spectroscopy and not a programmer, but I do have …

---

## [Profiling Tool from Juliacon 2018](https://discourse.julialang.org/t/profiling-tool-from-juliacon-2018/75447)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 0\
**Last updated:** [January 30, 2022, 4:19am UTC](https://discourse.julialang.org/t/profiling-tool-from-juliacon-2018/75447 "2022-01-30T04:19:58Z")

</div>

I was watching this video by Jameson Nash from Juliacon 2018 where he showcases a profiling tool (starts around 6:20 in the video). I really liked what he showed you could do with it, I imagine it could be very useful in…

---

## [ProfileView's @profview generates blank window](https://discourse.julialang.org/t/profileviews-profview-generates-blank-window/74997)

<div class="topic-metadata">

**Author:** [@kaitlyn-loftus](https://discourse.julialang.org/u/kaitlyn-loftus)\
**Replies:** 5\
**Last updated:** [January 24, 2022, 10:06am UTC](https://discourse.julialang.org/t/profileviews-profview-generates-blank-window/74997 "2022-01-24T10:06:59Z")

</div>

I am trying to use ProfileView’s @profview, but it’s only generating a blank window instead of a flamegraph. For a minimum working example, this behavior occurs for me with the ProfileView tutorial example: function pro…

---

## [BenchmarkTools.jl alternative for Python?](https://discourse.julialang.org/t/benchmarktools-jl-alternative-for-python/74754)

<div class="topic-metadata">

**Author:** [@NightMachinary](https://discourse.julialang.org/u/NightMachinary)\
**Replies:** 3\
**Last updated:** [January 17, 2022, 12:08pm UTC](https://discourse.julialang.org/t/benchmarktools-jl-alternative-for-python/74754 "2022-01-17T12:08:53Z")

</div>

I need to benchmark some algorithms in Python, and I can’t find anything that runs some code multiple times and reports its time and peak memory usage.

---

## [Profiling Requires.jl](https://discourse.julialang.org/t/profiling-requires-jl/73570)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 1\
**Last updated:** [January 11, 2022, 7:37pm UTC](https://discourse.julialang.org/t/profiling-requires-jl/73570 "2022-01-11T19:37:58Z")

</div>

Is there any way to profile which Requires.jl usage are taking the longest time?

---

## [Profile garbage collection?](https://discourse.julialang.org/t/profile-garbage-collection/73263)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 3\
**Last updated:** [December 18, 2021, 5:36am UTC](https://discourse.julialang.org/t/profile-garbage-collection/73263 "2021-12-18T05:36:24Z")

</div>

Is there a way to profile the garbage collection? For example, to trace which are the variables that are being collected?

---

## [How does function inlining reflect on the profiling output?](https://discourse.julialang.org/t/how-does-function-inlining-reflect-on-the-profiling-output/70471)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [October 28, 2021, 9:46am UTC](https://discourse.julialang.org/t/how-does-function-inlining-reflect-on-the-profiling-output/70471 "2021-10-28T09:46:23Z")

</div>

I have a Julia program. It includes a big function which calls another, small, function in two places. Profiling the execution and displaying a flame graph with ProfileView shows that most of the time is spent in the sm…

---

## [Should we improve the text output of Profile.print()?](https://discourse.julialang.org/t/should-we-improve-the-text-output-of-profile-print/67310)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 2\
**Last updated:** [August 30, 2021, 5:52am UTC](https://discourse.julialang.org/t/should-we-improve-the-text-output-of-profile-print/67310 "2021-08-30T05:52:34Z")

</div>

Currently, if you profile the function mentioned in ProfileView.jl’s README and Profile.print() you get the following output. using Profile function profile\_test(n) for i = 1:n A = randn(100,100,20) …

---

## [Accessing profiling data programmatically](https://discourse.julialang.org/t/accessing-profiling-data-programmatically/66355)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 0\
**Last updated:** [August 13, 2021, 7:49pm UTC](https://discourse.julialang.org/t/accessing-profiling-data-programmatically/66355 "2021-08-13T19:49:29Z")

</div>

I did not find an example of querying Julia profiling data for e.g. the number of samples that hit a given function. I want to post what I’m using in case it’s useful to anyone searching: using Profile using FlameGraphs…

---

## [Why does rand() report no allocations, but zeros() does when measured with --track-allocation=user?](https://discourse.julialang.org/t/why-does-rand-report-no-allocations-but-zeros-does-when-measured-with-track-allocation-user/65974)

<div class="topic-metadata">

**Author:** [@mdtisdall](https://discourse.julialang.org/u/mdtisdall)\
**Replies:** 3\
**Last updated:** [August 7, 2021, 2:43pm UTC](https://discourse.julialang.org/t/why-does-rand-report-no-allocations-but-zeros-does-when-measured-with-track-allocation-user/65974 "2021-08-07T14:43:01Z")

</div>

Very basic question: I’m trying to understand why the instantiation of A in the following small example doesn’t appear to produce any allocations in the profiling output: - function testfunc() 0 A = …

---

## [Understanding source of allocations when profiling](https://discourse.julialang.org/t/understanding-source-of-allocations-when-profiling/65831)

<div class="topic-metadata">

**Author:** [@mdtisdall](https://discourse.julialang.org/u/mdtisdall)\
**Replies:** 4\
**Last updated:** [August 4, 2021, 9:01pm UTC](https://discourse.julialang.org/t/understanding-source-of-allocations-when-profiling/65831 "2021-08-04T21:01:19Z")

</div>

I’m a little confused on how to attribute some allocations that I see, depending on how I profile some code. In particular, I’m curious because when I profile this code using julia --track-allocation=user (running testfu…

---

## [Could the Profile.print() tree view sort in the other order?](https://discourse.julialang.org/t/could-the-profile-print-tree-view-sort-in-the-other-order/63881)

<div class="topic-metadata">

**Author:** [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Replies:** 1\
**Last updated:** [July 1, 2021, 10:59am UTC](https://discourse.julialang.org/t/could-the-profile-print-tree-view-sort-in-the-other-order/63881 "2021-07-01T10:59:43Z")

</div>

Hi, I’m aware there are other ways of viewing profile output, but Profile.print() is pretty handy in a pinch. It would be even handier if the tree was sorted by count. The docs say that sortedby “Controls the order in…

---

## [Trying to understand ProfileView output](https://discourse.julialang.org/t/trying-to-understand-profileview-output/63561)

<div class="topic-metadata">

**Author:** [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Replies:** 2\
**Last updated:** [June 25, 2021, 4:37pm UTC](https://discourse.julialang.org/t/trying-to-understand-profileview-output/63561 "2021-06-25T16:37:32Z")

</div>

I am trying to figure what’s going on with some code that i am profiling. As you can see there from the graph below, there is a very large area at the left showing code that is clearly part of the Julia system (type\_infe…

---

## [Profile until buffer is full](https://discourse.julialang.org/t/profile-until-buffer-is-full/60480)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 1\
**Last updated:** [May 5, 2021, 5:45am UTC](https://discourse.julialang.org/t/profile-until-buffer-is-full/60480 "2021-05-05T05:45:09Z")

</div>

function busy(n) a = 0.0 for i = 1:n a += sin(i) a += cos(a) end a end import Profile Profile.init(; n=5000, delay=0.001) Profile.@profile busy(10^7) Profile.fetch() shows that the buffe…

[Previous page](https://discourse.julialang.org/tag/profiling/335.md?match_all_tags=true&tags%5B%5D=profiling)

[Next page](https://discourse.julialang.org/tag/profiling/335.md?match_all_tags=true&page=2&tags%5B%5D=profiling)
