Hi Piers, I just looked up some of my 5 (at least) year old code to see
which performance counter classes and namespaces I was using. It turns out
I was using the System.Diagnostics stuff and not the v2 classes you
mentioned and described here
<https://msdn.microsoft.com/en-us/library/system.diagnostics.performancedata(v=vs.110).aspx>.
They snuck this new namespace in years ago without me noticing, so thanks
for pointing it out. From a glance at the new documentation I see how
you're getting confused, as it looks like another fiddly mess to learn.
Sorry I can't help -- *Greg K*

On 8 March 2015 at 19:03, <[email protected]> wrote:

>  Has anyone on-list done anything with the 'all new' Performance Counters
> API that's in System.Diagnostics.PerformanceData (the CounterSet one, not
> the old PerformanceCounter / PerformanceCounterCategory classes)?
>
> Reason I ask is the old approach needed a bit of wrapping to get past
> flaws in the API, and the new approach looks a bit better (and what doco
> there is suggests it uses a better (somehow) underlying model introduced
> with Vista). However it seems to require a phalanx of weird and wonderful
> tools at build and deployment time in order to create and register the
> actual counter metadata, which all looks painful.
>
> I'm wondering if anyone persisted and got anywhere, gave up and stuck with
> the v2 approach or (as I suspect) not many people bother with custom
> counters in the first place?
> --
> piers
> more pedantry at http://piers7.blogspot.com/
>

Reply via email to