[Mono-bugs] [Bug 468625] New: PerformanceCounter "% Processor Time" effectively returns "% Idle Time"

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jan 22 16:32:17 EST 2009


           Summary: PerformanceCounter "% Processor Time" effectively
                    returns "% Idle Time"
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.2.x
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jaebird at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=267033)
 --> (https://bugzilla.novell.com/attachment.cgi?id=267033)
Test App

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:
Gecko/2008121622 Ubuntu/8.10 (intrepid) Firefox/3.0.5

In Windows under .NET, % Processor Time is the usage of the processor. Under
Mono it gives the % idle time. This is the inverse of what is needed.

Reproducible: Always

Steps to Reproduce:
Run the test app.
Actual Results:  
Process time should be slightly higher than user time

Expected Results:  
it is actually idle time...compare with top utility to see.

I patched the file, ./mono/metadata/mono-perfcounters-def.h @ line 16:
PERFCTR_COUNTER(CPU_PROC_TIME, "% Processor Time", "", Timer100Ns, unused)
PERFCTR_COUNTER(CPU_PROC_TIME, "% Processor Time", "", Timer100NsInverse,

This gave the correct output on my linux box, don't know what it will do on a
windows box.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list