False CPU usage reading?

Discussion and feedback on Construct 2

Post » Sun Jan 05, 2014 9:29 pm

Why is my task manager CPU usage reading not matching up with the Construct 2 debugger CPU usage reading?

https://www.dropbox.com/s/bktn80fhb4xhm24/cpureading.pngcorlenbelspar2014-01-05 21:30:25
B
45
S
13
G
1
Posts: 236
Reputation: 4,010

Post » Sun Jan 05, 2014 10:41 pm

In your case I'm going to bet the difference is Multi core. I don't believe JS runs on multiple cores at this time. So your game can use 100%, but if you have 4 cores then it's only really using 25% of your overall system performance.

I could be wrong on the JS not using multicore though.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038

Post » Sun Jan 05, 2014 10:46 pm

Shouldn't it be showing on the first core's graph though? I've had games before that end up using only one core and push it to its peak on the graph and all my cores were at 1% or less until I started running that game in C2.corlenbelspar2014-01-05 22:47:14
B
45
S
13
G
1
Posts: 236
Reputation: 4,010

Post » Mon Jan 06, 2014 1:26 am

i dont know what browser you use but you should also test this using a different browser i know for me in a couple versions of chrome the debugger cpu use lists wrong values
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Mon Jan 06, 2014 2:40 am

I almost always use Node-webkit. Though I've tested it and Chrome gets similar performance while Firefox is about half as able to run at full speed.
B
45
S
13
G
1
Posts: 236
Reputation: 4,010

Post » Mon Jan 06, 2014 11:12 am

From the manual entry on the debugger:

"The estimated CPU time (e.g. 20% CPU): an estimate of how much CPU time is being spent in the logic of the game. This is not always accurate, especially since it only takes in to account time spent on the main javascript thread, and should only be considered a ballpark figure. The profiler can break this down in to how much time is being spent in each area of the game, and is described in more detail later on in this guide. This value corresponds to the CPUUtilisation system expression."

Emphasis mine.


In addition, although it's likely to provide a more accurate picture of overall system resource usage the Windows task manager also doesn't provide entirely accurate results -- it's a simple tool intended to provide a picture of computer performance suitable for general end-users -- not a precise tool intended for developer usage.jbadams2014-01-06 11:17:31
B
32
S
8
G
2
Posts: 110
Reputation: 3,648

Post » Mon Jan 06, 2014 12:02 pm

You should at least be using Resource Monitor..

Procmon's profiling events will give you better idea tho!

Would anyone benefit from a performance testing tutorial?!
B
9
S
3
G
1
Posts: 112
Reputation: 1,827

Post » Mon Jan 06, 2014 12:16 pm

On a quad core system Windows will report 25% CPU usage when one of those four cores is running at 100% and the other four cores are idle. Even then the graphs of each core's activity is not always accurate in Windows either, seeming to show activity shared across cores for some reason. In this case the 97% estimated CPU usage in the C2 debugger means "basically all your CPU time is used up", and that measurement is based on a single thread (and therefore one CPU core).
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,351

Post » Mon Jan 06, 2014 12:24 pm

Resource monitor says the same thing as taskman. I guess I can only hope for the system to eventually work on multiple cores in the future... or get a better computer.

Thanks guys for clearing up the issue.
B
45
S
13
G
1
Posts: 236
Reputation: 4,010


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests