'The purpose of using an instcounter is to track particular
instances of a counter object (e.g. a single processor, a single
running copy of a process).  For instance, to track all python.exe
instances, you would need merely to ask:
query.addinstcounter(\'python\',\'Virtual Bytes\')
You can find the names of the objects and their available counters
by doing an addcounterbybrowsing() call on a query object (or by
looking in performance monitor\'s add dialog.)
Beyond merely rearranging the call arguments to make more sense,
if the volatile flag is true, the instcounters also recalculate
the paths of the available instances on every call to open the
query.'

def addinstcounter(self, object, counter, machine=None, objtype='Process', volatile=1, format=win32pdh.PDH_FMT_LONG):

    if volatile:
        self.volatilecounters.append((object, counter, machine, objtype, format))
    else:
        self.paths[len(self.paths):] = self.getinstpaths(object, counter, machine, objtype, format)
