Questions tagged [cpu-time]

103 questions
1
vote
1 answer

Does context switching usually happen between calling a function, and executing it?

So I have been working on the source code of a complex application (written by hundreds of programmers) for a while now. And among other things, I have created some time checking functions, along with suitable data structures to measure execution…
1
vote
0 answers

CPU time value in resource manger is different from CPU time obtained with 'time' command

I am trying to get the CPU usage time of my Python program using time python my_code.py, where the program executes a long deep learning training process. The result of time command is 244m for user-time and 13.5m for sys-time (after dividing by the…
Orwa kassab
  • 111
  • 1
  • 9
1
vote
0 answers

coreData background thread killed because cpu time exceeding limit

My watch extension fetches many items from coreData in a background thread, using this code (shortened): coreDataSerialQueue.async { backgroundManagedContext.performAndWait { … let buyItemFetchRequest:…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
1
vote
1 answer

MATLAB Cpu time =0 issue

I have written a function in MATLAB. Within that function I use: t = cputime; ... time = cputime-t; Where I have some operations at the dots. Whenever I don't call the function and instead run the code in the function manually, I always have time =…
1
vote
0 answers

MapReduce job with AWS Elastic MapReduce EMR - why 648 MB input was split into 27 map tasks?

I used AWS EMR (Hadoop streaming) for processing 648 MB input data in 9 text files (approx. 72 MB each stored in s3). I thought it split the data into either 64MB or 128MB blocks, but the log says that it split into 27 map tasks (I think one map…
1
vote
0 answers

ThreadMXBean.getThreadCpuTime returning 0

I had to crash course a bit on Java threading due to time constraints, so pardon me if this question seems ignorant. The main idea is that I'm trying to get the CPU time for the DoubleHash's search function, but for some reason, I've been getting…
Cheryl
  • 67
  • 12
1
vote
3 answers

How can I measure thread specific time in Android?

In standard JVM (e.g., version 1.8), we can access the current thread's time like this: ManagementFactory.getThreadMXBean().getCurrentThreadCpuTime(); What is the equivalent methodology to get current thread's time in Android (i.e., Dalvik VM).
cagryInside
  • 790
  • 2
  • 15
  • 41
1
vote
1 answer

Using IPython's %%time magic within a script to measure CPU time

I work with Jupyter/IPython quite a lot and am used to including %%time magic command in front of each cell to get a hint of the amount of CPU and wall clock time spent. Is there a simple way to obtain the same measurements from within a…
KT.
  • 10,815
  • 4
  • 47
  • 71
1
vote
0 answers

Using multiprocessing [joblib used] in python, what does it mean if Wall Time >> CPU Time? (240 seconds vs. 0.22 seconds)

I'm running a function in parallel with python multiprocessing module. This function takes images as input, and outputs some measurements. The problem is that, I compared the results of time.time() vs time.clock(), it seems the wall-time is WAY…
Ruby
  • 284
  • 1
  • 5
  • 18
1
vote
1 answer

How to measure cpu time of TCL script

I have long TCL script . I want measure exact cpu time the process is taking in TCL I tried the time command in TCL but I am not sure it is correct way to measure cpu time taken by complete TCL script
TechEnthusiast
  • 273
  • 4
  • 18
1
vote
1 answer

R How to get total CPU time with foreach?

I am trying to get total CPU hours of a code run in parallel (using foreach from the package doParallel) but I'm not sure how to go about doing this. I have used proc.time() but it just returns a difference in 'real' time. From what I have read of…
Plinth
  • 289
  • 1
  • 13
1
vote
1 answer

/usr/bin/time, interpret the output

I wanted to record the cpu time of running some programs, I put /usr/bin/time command in from the the command, like the following: /usr/bin/time command_name_and_args the result I got as follow: 652.25user 5.29system 11:53.85elapsed 92%CPU…
Xiangwu
  • 715
  • 3
  • 13
  • 25
1
vote
1 answer

Calculate the runtime of system() command in C using clock() function

I am trying to calculate the time taken by the system command in my C program. I am trying to call a MATLAB routine from C using system() function within C. I want to calculate how much cputime is consumed from the time system() is called, MATLAB…
NMA
  • 11
  • 2
1
vote
0 answers

How to save query statistics time in database?

I am able to get CPU time and elapsed time by using Statistics Time On in stored procedure in SQL, but the output is coming in messages window. How to fetch CPU time and elapsed time in the query so that i can save it in database? OK Fine. I have…
waleedansari
  • 197
  • 1
  • 2
  • 16
1
vote
1 answer

get cpu time of an external process and it children while it still running on OS X

On linux I can use /proc as stated in How to calculate the CPU usage of a process by PID in Linux from C? to get the cpu time of a process and it children. How would I do this on OS X?
Bilal Syed Hussain
  • 8,664
  • 11
  • 38
  • 44