Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Anybody know this ?

Anybody know this ?

Scheduled Pinned Locked Moved C#
performancequestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Glen Liu
    wrote on last edited by
    #1

    I want to display some values like Windows Task Manager - Performance: Commit Charge (K) -- Peak Physical Memory (K) -- Total, System Cache How can I get this values using PerformanceCounter ? Thanks.

    M 1 Reply Last reply
    0
    • G Glen Liu

      I want to display some values like Windows Task Manager - Performance: Commit Charge (K) -- Peak Physical Memory (K) -- Total, System Cache How can I get this values using PerformanceCounter ? Thanks.

      M Offline
      M Offline
      mike montagne
      wrote on last edited by
      #2

      That would be quite a trick. You would have to descend from PerformanceCounter to build a composite class that got that information for you from the class(es) you should be getting that information from directly. That would sort of be the long way around the problem kinda sorta wouldn't it? Search your documentation and find the class(es) that do what you need to do. Call their methods or read their properties, and you won't have to design a class that uses that class to find out you can use that class directly. BTW, here is what your documentation says about PerformanceCounter (I checked, just not to embarrass myself to horribly): http://msdn2.microsoft.com/en-us/system.diagnostics.performancecounter(VS.71).aspx If you don't find an appropriate member, your class search has just begun.

      G 1 Reply Last reply
      0
      • M mike montagne

        That would be quite a trick. You would have to descend from PerformanceCounter to build a composite class that got that information for you from the class(es) you should be getting that information from directly. That would sort of be the long way around the problem kinda sorta wouldn't it? Search your documentation and find the class(es) that do what you need to do. Call their methods or read their properties, and you won't have to design a class that uses that class to find out you can use that class directly. BTW, here is what your documentation says about PerformanceCounter (I checked, just not to embarrass myself to horribly): http://msdn2.microsoft.com/en-us/system.diagnostics.performancecounter(VS.71).aspx If you don't find an appropriate member, your class search has just begun.

        G Offline
        G Offline
        Glen Liu
        wrote on last edited by
        #3

        Thanks. :laugh:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups