PerformanceMonitor Bug with steady value.

Mar 15, 2009 at 8:37 AM
PerformanceMonitor doesn't render when the new value is the same as the old value, since the when the value is the same the ValueProperty hasn't "changed" so the event doesn't fire and so Animate() is not called.

Here is a quick hack I put in place to "fix" it, Im only working with interger values so the 0.1 difference doesn't matter to me.

set
{
    double old = this.Value;

    // Hack to correct it not drawing if the value stays the same.
    // Its broken like that becuase the ValuePropertyChanged doesn't fire since the value is the same and hasn't "changed".
    if (value == old)
    {
        value += 0.1;
    }

...


Also, any thoughts on creating a TrafficMonitor, like MRTG or RRDTool?
Thats what I'm using Performance Monitor for currently, using 2 of them for Upload/Download.
I tried quickly hacking in a Value2 property and got that working but somehow I broke the fill functionality and it was displaying pretty messed up.
I'll probably give it another look soon when I get some time to look it over...


Mar 19, 2009 at 7:27 PM
Hi,

Can you please forward me your code behind implementation? I can't successfully measure my CPU usage and would like to take a look at how you're doing it.

Thanks.
Coordinator
Mar 19, 2009 at 9:20 PM
Sorry for the delay in replying.

I'm going to lookin to this at the week end. I am trying to get my new developement box up and running.

D
Mar 19, 2009 at 9:56 PM
Hi David,

I am trying to get the CPU utilization through through a Performance counter but there's assembly reference available for using System.Diagnostics.PerformanceCounter. Any help on implementing the CPU usage and binding it to your performance monitor would be much appreciated.

Thank.
Apr 7, 2009 at 7:44 PM
Hey I would like to use this performance monitor like a chart.  I want to bind data to it.  I'm not familiar with Silverlight really, but I am with ASP.NET.  Is anyone able to help me?