It is currently December 10th, 2018, 8:55 pm

New UsageMonitor plugin

Changes made during the Rainmeter 4.2 beta cycle.
User avatar
tjhrulz
Developer
Posts: 223
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: New UsageMonitor plugin

tjhrulz » November 21st, 2018, 5:13 am

rxtd wrote:
November 18th, 2018, 9:51 pm
Youkai1977, UsageMonitor has different number and string values. Most of the other measures have same number and string values, or only have meaningful string value.
When you use old PerfMon plugin in the place where a string value is expected, you will get numbers. Because string value of the PerfMon plugin is the same, as its number value.
When you use UsageMonitor plugin in the place where a string value is expected, you will its string value, which is the name of the instance.
In case of String meter you need to do something to make it show number value. For example:
1) Use Calc measure which will extract number value from UsageMonitor, and set its value to this number. Calc measures have same number and string values.
2) Use [DiskAccess_C_R:] form of the access to a measure, with DynamicVariables enabled. Notice the colon: [DiskAccess_C_R:].
Not all measures/meters will access string value of a measure. Calc measure, as you already know, uses number value. Bar, Line, and some other meters/measures will also get number value. So you don't need to always use Calc. You only need it if you don't want to use dynamic variables or want to pass number value of UsageMonitor to a place, where string value is used (like in MeasureName=somemeasure in String meter).
Someone got it, Thank you!

Yeah the way UsageMonitor works was very intentional. Mind you to get the String and Number value before you would have had to have done two measures and the second measure was just as expensive as the first (With the exception of NomFerp which if you used parent children the it would be slightly less expensive). The only reason you need a calc is if you do any manipulation to the number (Such as rounding or trimming it). When I was building the plugin I talked with jsmorley about adding the ability for scaling for inline measure's number access and we agreed that was a bad idea.
rxtd
Posts: 65
Joined: April 30th, 2017, 11:51 am

Re: New UsageMonitor plugin

rxtd » November 21st, 2018, 5:38 am

tjhrulz wrote:
November 21st, 2018, 5:13 am
Mind you to get the String and Number value before you would have had to have done two measures and the second measure was just as expensive as the first (With the exception of NomFerp which if you used parent children the it would be slightly less expensive).
Actually, I think that with parent/child approach declaring one more child measure is pretty cheap. It's not "slightly less expensive", it's roughly as declaring empty measure. Especially cheap when using index to get value, but accessed names of the instances can be cached, so they are cheap too.
And result string value could be controlled with an option, just as it's done in PerfMonPHD and PerfMonRxtd plugins.
User avatar
tjhrulz
Developer
Posts: 223
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: New UsageMonitor plugin

tjhrulz » November 21st, 2018, 6:35 am

rxtd wrote:
November 21st, 2018, 5:38 am
Actually, I think that with parent/child approach declaring one more child measure is pretty cheap. It's not "slightly less expensive", it's roughly as declaring empty measure. Especially cheap when using index to get value, but accessed names of the instances can be cached, so they are cheap too.
And result string value could be controlled with an option, just as it's done in PerfMonPHD and PerfMonRxtd plugins.
I was refering to NomFerp specifically in that regard, although slightly is understating it as going from a 300ms hit to a 15ms hit is a big one. But that is still 14ms+ more than UsageMonitor.
User avatar
Youkai1977
Posts: 13
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: New UsageMonitor plugin

Youkai1977 » November 25th, 2018, 12:06 am

@rxtd and the others:

Sorry that I have not responded to your response from 18 September. At the moment I'm pretty busy in my family. Anyway, I'm still looking at the thing with the UsageMonitor and rewrite my meters accordingly. However, the thing about translating me makes a lot of problems. The Google Translator is not always very helpful ... there are sometimes sentences around, because then I understand nothing more. Say I need time. The thing that helps me best is code snippets or code examples. Why then what is as it is, is rather secondary to me. It should only work ...
User avatar
balala
Rainmeter Sage
Posts: 7152
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: New UsageMonitor plugin

balala » November 25th, 2018, 2:23 pm

Youkai1977 wrote:
November 25th, 2018, 12:06 am
Sorry that I have not responded to your response from 18 September.
Sorry, 18 November, not September, to be precise.
I'm not sure, do you have any further question?
User avatar
Youkai1977
Posts: 13
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: New UsageMonitor plugin

Youkai1977 » November 26th, 2018, 7:13 am

balala wrote:
November 25th, 2018, 2:23 pm
Sorry, 18 November, not September, to be precise.
No commend :o :oops:
I'm not sure, do you have any further question?
To UsageMonitor ... I do not know currently. If I do not even remember what month we have :oops: :rofl:

On the subject of Rainmeter in general I will certainly have many more questions in the future
User avatar
balala
Rainmeter Sage
Posts: 7152
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: New UsageMonitor plugin

balala » November 26th, 2018, 1:59 pm

Youkai1977 wrote:
November 26th, 2018, 7:13 am
On the subject of Rainmeter in general I will certainly have many more questions in the future
Ok, when you have any, just feel free to open a new topic.
User avatar
cwfrizzell
Posts: 76
Joined: August 10th, 2009, 9:03 pm

Re: New UsageMonitor plugin

cwfrizzell » Yesterday, 5:19 am

How does one measure running processes, both total and user?
Cheers!

Chuck