Questions tagged [profiling]
Profiling is the process of measuring an application or system by running an analysis tool called a profiler. Profiling tools can focus on many aspects: functions call times and count, memory usage, cpu load, and resource usage.
5,804
questions
0
votes
1
answer
14
views
Does perf stat -C X <command> run the command on core X?
I want to profile a command, say ls, on a single core. I can use the -C flag of perf stat to specify which core to profile, but does ls actually run on the core I choose here?
Attempting perf stat -C ...
0
votes
0
answers
6
views
How to read XCode Instruments' profile tree view?
I am trying to get myself used to XCode instruments to profile my code. I happen to see this tree view in Instruments' time profiler:
What irritates me is the following: The highlighted function ...
3
votes
1
answer
104
views
Why is this += loop faster than the equivalent = loop?
I wrote this simple loop in C++ (Visual Studio 2019 in Release mode) that goes through one million 32-bit integers and assigns each to the previous:
for ( int i = 1; i < Iters; i++ )
...
1
vote
1
answer
30
views
Profiling Python code one x86 instruction at a time
I recently had a discussion about what the Python interpreter is actually doing when you multiply an array with an integer, e.g. [1] * 3. Someone suggested that Python will generate 3 copies of [1] in ...
0
votes
0
answers
36
views
nv-nsight-cu-cli error "Disconnected from process 2725, No kernels were profiled."
I am trying to profile using nsight, and I want to profile a python file through the command below. But I get the following error..
/usr/local/cuda-11.4/nsight-compute-2021.2.2/nv-nsight-cu-cli ...
0
votes
0
answers
25
views
Page walk cycles effect on total execution cycles
I have measured cycles and dTLB_load_misses.walk_active for an application using perf tool. I executed the application two times. First time in isolation and the second with a single thread memory-...
1
vote
0
answers
26
views
Branch-misses profiling in Visual Studio 2022
On Linux, I have perf for profiling branch misses. Is there something similar in VS 2022?
1
vote
1
answer
28
views
Unable to view Flamegraph in JDK mission control v8.2
I am using JDK Mission Control v8.2 for profiling a JAVA program for learning purposes. When I go to Threads/Methods and try to find the flame graph of it, the tab is blank.ScreenShot. Also, the ...
0
votes
0
answers
32
views
Visual C++ | How to benchmark EVERY FUNCTION and log output? [duplicate]
Question in title. I want to know how I can neatly log or see all execution times of each and every function, without actually having to paste the chrono timer stuff into every function ...
Any help ...
0
votes
0
answers
28
views
Why do I have 35% of my cpu stalled-cycles-backend when only using 200MiB of ram?
I'm trying to profile my app and make it faster but I'm unsure if its hardware/memory bound or if I can improve it. I use perf stat to profile my app and saw 35% next to stalled-cycles-backend. The ...
0
votes
0
answers
21
views
Nvidia nvprof: Observe PyTorch CUDA calls [duplicate]
I've written a small PyTorch program which just does one 2D convolution on the GPU.
Now I would like to observe the kernel calls / runtimes with nvprof - is this possible and if so - how?
I am used to ...
0
votes
0
answers
26
views
Pandas Profiling
I have been struggling with the installation of pandas profiling.
from pandas_profiling import ProfileReport
ImportError: cannot import name 'ABCIndexClass' from 'pandas.core.dtypes.generic' (C:\Users\...
0
votes
0
answers
55
views
Why is Line profiler showing only partial results?
My line profiler %lprun -f works but does not show the line contents but only the numbers. So it is useless for me. It shows some directory problem as below.
Timer unit: 1e-07 s
Total time: 0.962042 ...
0
votes
1
answer
18
views
Why Name not defined error with %lprun profiling? Suddenly not working
Previously, I had successfully used the %lprun profiler for my code in Jupyter notebook and now I want to profile some other code in JupyterLab. I used the same format as before but it is throwing a ...
1
vote
0
answers
19
views
pyroscope: how to use py-spy configs in pyroscope python client
I have recently used Pyroscope for my python program. It uses py-spy for profiling the programs. I have checked the configuration of the Pyroscope python client, and the configs are very limited which ...
0
votes
0
answers
7
views
Scene freezes but game continues at back
I'm using 2020.3.15f2 at my project. Not regularly, but sometimes game freezes visually on mobile phone. I mean that moment is always on the scene even you change to different scene. You can click ...
0
votes
0
answers
20
views
How can one profile an ONNX model with random inputs, without having to specify the input shape?
I was given several ONNX models. I'd like to profile them. How can one profile them with random inputs, without having to specify the input shape?
I'd prefer not to have to manually find out the input ...
0
votes
0
answers
79
views
Count number of function calls per second for a specific program
The following command:
perf record -e cpu-clock my_program
gives the output shown below:
How can I also get information on how many times each function was called in one second?
-1
votes
1
answer
37
views
How to find slowest GET/POST request in Laravel application
I am working on application which uses Laravel framework. Yesterday my manager came and told me find top 10 slowest GET/POST request in entire application. So is there any tool available for this ...
0
votes
0
answers
16
views
How can I easily store python profiler/timing information as a dictionary/json?
I've come across two packages for measuring timing information for arbitrary python code:
Built-in profile (https://docs.python.org/3/library/profile.html)
Excellent codetiming package (https://pypi....
1
vote
1
answer
49
views
Java - netty library execution time very big - Java NIO
I am developing a Java application that reads data from a Redis Database, I use Lettuce library to connect to Redis which in turn uses 'Netty' library to communicate with Redis
I suspect that the ...
3
votes
2
answers
43
views
how to profile blocking code in java – measure execution time instead of CPU time
I am trying to profile that is often blocking in either database and rest calls. The code is not cpu bound. The following sample junit methods should illustrate the issue:
@RepeatedTest(10)
void fast()...
0
votes
0
answers
17
views
Can you get CPU usage percentage based on profiling data displayed on a FlameGraph
Initial Background: I am working with eBPF for CPU profiling, using BCC, and then dumping the output of the profiling tool to a FlameGraph. I have also tried passing a PID to trace a single process ...
0
votes
1
answer
29
views
AMDuProf missing golang sources
I want to profile my program with AMDuProf profiler, but setting root/source folder doesnt work and profiler show only disassembly code. It seems that despite (or together with) lacking source code it ...
0
votes
0
answers
37
views
Single thread consumes > 100% CPU usage, according to XCode Instruments Profiler?
I profiled an app (Mac OS) using CPU Profiler, part of the XCode Instruments tools.
I expect that each thread (of my process) can at the most consume 100% CPU usage. It cannot consume more than 100% ...
-2
votes
2
answers
84
views
Why is Python any( pred for _ in _ ) much faster than for loop
This question is very similar to: this post, but I couldn't find the answer there.
# 0m2.676s
#
# note that it should be == instead of in
# but as far as timing goes, it would be even faster
# (thanks ...
0
votes
1
answer
139
views
Visual Studio 2022 - CPU usage over 100% in built-in profiler
I've been profiling my .NET 6 app which runs a couple of different algorithms.
When analysing the Total CPU % with the built-in profiler I was getting values over 100%, they were like 509.22%or even ...
-2
votes
0
answers
18
views
Recommendation GPU/CPU Profilers
I am looking for GPU profilers that also bring CPU information and that can export information to a CSV or similar file.
I tried using Tensorflow profiler but got too many bugs and I don't understand ...
0
votes
0
answers
12
views
Is there some kind of cpu/ram usage monitor that can be accessed from a browser by anyone from anywhere?
I just want a simple system usage monitor that I can access from anywhere from any browser. I would probably prefer it to be in NodeJS but to be honest anything will work. I found express-status-...
1
vote
2
answers
150
views
Haskell extremely slow simple recurrence
I'm experimenting with Haskell profiling with a simple recursive max algorithm:
max_tag :: Integer -> [Integer] -> Integer
max_tag head [] = head
max_tag head (x:xs) =
let {m = max_tag x xs} ...
0
votes
1
answer
16
views
How to profile branch prediction hitrate in Java
Is there a tool available to profile java applications regarding branch (mis)prediction statistics for if statements?
I know VisualVM and JDK Mission Control but did not find such functionality.
0
votes
0
answers
13
views
How to "automate" Xcode instruments to catch non-allocating (persistent) objects?
Would anyone know if it’s possible to "automate" Xcode instruments to catch non-allocating (persistent) objects?
I caught this issue using the “leaks” tool, but now I would like to automate ...
0
votes
0
answers
24
views
how to count changes of thread state in java?
I'm working on a multithreaded software (in Java) using the classic producer-consumer pattern. The consumers are really slow therefore the producers are spending most of the time waiting for the queue ...
1
vote
0
answers
37
views
links between pieces (functions, routins, vars, etc) of a code? [duplicate]
Is there any program that draws something like a diagram between all functions, modules, etc in a program in the repository? For example, in this Matlab repository the function called SCOPE.m calls a ...
0
votes
0
answers
38
views
CPU profile of hermes / JSC on release apk of react native app
Is it possible to do a CPU profiling (Flame graphs and call stack measurements in chrome performance tab) of the JS runtime in a react native app (hermes or old jsc) which is run in a release apk. I ...
0
votes
0
answers
17
views
What could be the reason for this difference for the same output?
I have two programs which do the same thing, load JSON from file and flatten them. In one program flat_json function implementation is done inside main function only(flat_json_inside.py) and in other ...
0
votes
0
answers
25
views
How to improve "nt.stat" and "getmodule" performance in python?
I am running a python script using a local packakge folder on my computer. It is significantly slow. I tried to profile it use the "cProfile". Below is the result
27163509262 function ...
0
votes
1
answer
23
views
Measuring await time in Node
Let's say I have a function in Node
const my_function = async () => {
await sub_function_1();
await sub_function_2();
await sub_function_3();
}
I could profile how long it takes my_function ...
2
votes
2
answers
789
views
Pandas Profiling Import Error: cannot import name 'soft_unicode' from 'markupsafe'
I have an issue with getting started with pandas profiling.
I tried loading pandas profiling, but upon installation this error pops up:
ERROR: pip's dependency resolver does not currently take into ...
0
votes
0
answers
14
views
Clear usage of Linux perf
How do we use tool [B]perf[/B] upon a c source code, that would quickly locate lines of source code that have high cache miss rates, in its syntax detail ?
What other tool(s) of the kind, performing ...
0
votes
1
answer
29
views
xhprof-html won't show Run Report (No XHProf runs specified in the URL)
How do I show the Run Report for a given xhprof run using xhprof-html?
I installed tideways-xhprof.
apt-get install php-dev
git clone "https://github.com/tideways/php-xhprof-extension.git"
...
0
votes
0
answers
22
views
Missing line-level profiling in Chromium DevTools
Chromium DevTools used to have this very useful feature where, after doing a performance profile, lines viewed in the Sources tab would display how much execution time they took. Like this:
However, ...
0
votes
0
answers
10
views
Profiling the behavior of CUDA kernel blocks
I'm profiling a kernel whose work in different blocks is not uniform:
Different blocks may read or write different amounts of data.
Some blocks may be reading mostly cached data, while others do not.
...
1
vote
0
answers
95
views
ActivitySource.StartActivity returns null as if there is no listeners even though console listener is defined
The code uses Console Trace Provider. However, In the function static void MakeActivity(string name),
The line ActivitySource.startActivity returns a null. How can i fix it?
The examples on google ...
1
vote
1
answer
49
views
Timing a class function in C++
A previous post, Timing in an elegant way in C, showed a neat method for profiling using a wrapper function. I am trying to use one of the profiler to profile my class functions.
#include <cmath>...
0
votes
0
answers
9
views
How does react-dev-tool profiler get the information?
I am trying to access profiling/tracing data from a React application
It turns out, the React profiler (from react-dev-tools) can access exactly the type of information I am looking for (all ...
0
votes
0
answers
17
views
Tensorflow profiler tutorial Metrics
I have tried for a fews days to use Tensorflow profiler to measure resource usage. But I can't understand the interface in order to get the data I need. I think it has something to do with "...
0
votes
1
answer
43
views
MySQL: slow select without where and joins
I have the following table:
| ticket | CREATE TABLE `ticket` (
`ticket_id` bigint(20) NOT NULL AUTO_INCREMENT,
`client_id` binary(16) NOT NULL,
`owner_id` binary(16) DEFAULT NULL,
`...
2
votes
2
answers
32
views
How to do vectorization using numpy on the condition that if larger then overwrite?
I need to write something like below. But how to use np.where or any other vectorization method to speed it up?
import numpy as np
A = np.arange(5)
B = [4, 3 ,1 ,2]
C = np.zeros(A.shape)
for a, b in ...
4
votes
2
answers
91
views
How to use software prefetch systematically?
After reading the accepted answer in When should we use prefetch? and examples from Prefetching Examples?, I still have a lot of issues with understanding when to actually use prefetch. While those ...