Writing Windows performance counters

David Mitchell djmitchell at spamfree.optushome.com.au
Sun Feb 8 21:53:54 EST 2004


Hello group,

I'm trying to write code to test an application we're developing.  This
application needs to store its own performance data in the registry, and
we'd like to be storing quite a large amount of performance data and
updating it fairly quickly.  Not surprisingly, we keep coming up with more
and more performance data we'd like to be writing to the registry.

My job is to come up with a test harness to establish the following:
- create X new Windows performance counters and update each of them every
Y milliseconds with some (random) value

I then need to try this for various values of X and Y, and note how the
performance of the overall application/system drops off as we increase X
and Y. We'll then draw a line in the sand and say "X and Y must be less
than these values", and go forward from there.

Could someone point me towards some sample code that creates performance
counters and updates them?  I suspect it's possible using perfmondata.dll
that comes with win32all, but can't begin to guess how to get started.

Thanks in advance

Dave M.



More information about the Python-list mailing list