2 - another suggestion and another question :p
First I suggest that in the documentation you could mention that: when the LibQTip option is on, the addon which contains the LibQTip instance will have a significant increase of CPU usage when we are watching the Broker_CPU tooltip updates. You have mentioned the preference of using standalone libraries in the document but I just couldn't link these two things together lol It confused me for quite a while :x
Second, may I ask what's the exact meaning of % column in the CPU usage? It looks like a gradient thing, d(usage) / dt ?
say, addon A uses 10ms CPU time in the latest sec, 10ms/1sec = 1%, is it the number shown in Broker_CPU tooltip?
If addon A keeps using 10ms CPU time every second for 10 mins, is the 1% shown constantly in the tooltip?
I think the Up/Equal/Down arrow icon column right to the CPU % refers to this value?
What I want to say is, addon A is bad because it uses 10ms per second, but it's also stable because it doesn't change its behavior.
Considering addon B which uses 1ms per second in general but sometimes uses 100ms in a second, it is unstable and may cause a freezing problem.
I want to know which addons are CPU-heavy but I also want to know which addons have unstable CPU usage.
The latter one is like a differential of gradient, and I expect to see it expressed in the arrow icon column.
Forgive me if I misunderstand far from the meaning, I ask because I see most are Up arrows and I've never seen a Down arrow next to CPU %.
| User | When | Change |
|---|---|---|
| merah | Jan 03, 2011 at 19:36 UTC | Changed status from New to Accepted |
| Everdreamer | Dec 28, 2010 at 07:34 UTC | Create |
- 4 comments
- 4 comments
Facts
- Last updated
- Mar 30, 2012
- Reported
- Dec 28, 2010
- Status
- Accepted - Problem reproduced / Need acknowledged.
- Type
- Enhancement - A change which is intended to better the project in some way
- Priority
- Medium - Normal priority.
- Votes
- 1
- Reply
- #4
merah Jan 03, 2011 at 19:34 UTC - 0 likesanyway thank you for the suggestion, I will let this ticket open because I had in mind too to add stats, maybe graphs as seen in auctioneer, yet I have two new babies SpamBayes to work on, they are going to be great, gif zem a try ;)
- Reply
- #3
merah Dec 31, 2010 at 13:40 UTC - 0 likesthe colorgradient like other values updates to each threshold ticks so it last until the mod uses less resources
There is no way yet to see how much previous peaks the mod used to do, maybe if I find a simple way to add it I will add it, I need something like a library building graphics for example so I can add this feature without to much enlarging the mod size because this feature requires for sure more memory
- Reply
- #2
Everdreamer Dec 29, 2010 at 15:36 UTC - 0 likesThanks for the detailed explanation :D
I understand the memory part and garbage collection, but was confused at the CPU usage part. Now I see there is no Down arrow on CPU, can you explain a bit how the colorgradient on CPU works? Is it also delta(usage)/delta(time) ?
In my previous example, when addon B suddenly behaves bad, I know Broker_CPU will show it orange or red, but how long will the "bad color" last? Will the color return to green next second because addon B resumes its normal behavior? If so, is there a good way to monitor this kind of peak behavior?
- Reply
- #1
merah Dec 28, 2010 at 12:28 UTC - 0 likesAbout the documentation I believe I have said it all already, to disembed a library you have to delete it from the addon embedding it and install the library like a normal addon in the \AddOns folder
% is the difference between the old (at last threshold tick) and current value / 10 as seen in performancefu, its on the first page since a few days ago, so If addon A keeps using 10ms CPU time every second for 10 mins, is the 1% shown constantly in the tooltip? yes, because bkcpu retrieve datas each seconds (by default with a tip update threshold to 1) so you have the current usage
Considering addon B which uses 1ms per second in general but sometimes uses 100ms in a second, it is unstable and may cause a freezing problem. Then you will see it because the CPU count does not reset until you disconnect or reloadui and anyway if a mod use that much 100ms in one second he will most likely appear orange or red because the colorgradient is based on the value evolution, not the current amount
The up arrows value are just here to represent how big is the new value near the old, if > then red arrow, if less a green arrow and if the value did not change, a yellow bar, its just another way of providing color gradients.
There is never a green arrow on CPU (on just in some rare case when the client is probably re-evaluating the usages) because an addon cannot technically use the cpu less than it has already done, if you travel from X to Y and it tooks 5min, it wasn't 1 min right ?
Memory has green arrow because the amount of memory is sometimes bigger than the current real one.
To say it simple, memory has a lifetime, and Blizzard set a limit in the client so your mod cannot technically use all of your 12GB RAM.
So now they have set a 100Mb limit allowed for mods, how to be sure X mod will not ninja all of the free memory ?
This is the garbage collection that happens regularly and you see represented in Broker_CPU when all mods gets a green arrow on the memory, the client is collection all the "dead" memory (called garbage)
When a mod produces to much memory its called the garbage memory which your client collect silently
The goal is then for a mod to produce the minimum of this dead memory so the client collection will be quicker, a mod with a tiny memory can show better than a bigger one at a first look but if you see it generate 10Mb memory and then the client collect also these 10Mb, means the mod is producing 10Mb of dead memory thats worse then the bigger mod producing its 200KB of dead memory, they were collected quicker
if do you want a sample you can try broker_cpu release12 versus alpha15 with icons, the release will create more garbage because I have made an error by creating two tables in a heavy loops and I did not reuse them so they are waiting to be collected
If you still don't understand I recommand you to read
http://lua-users.org/wiki/OptimisationTips
http://www.lua.org/gems/sample.pdf
They explain this better then me for sure