I've been asked how to find out how much memory and CPU my program is using, and I've been referred to Performance Counters. However, when I look at the documentation it starts off by telling me about providing consumer data by creating a manifest for my application, and my eyes glaze over. It's nice that such a general-purpose tool is there, I suppose, but all I wanted was a set of functions that would tell me how much memory and CPU my program is using.
Are performance counters the right tool for my job? If so, how do I use them? I really don't want to have to set up anything outside my C# application.
NOTE: I'm not looking for a third-party profiling app, I need to have the memory and CPU data displayed by my app.
UPDATE: I've removed time in functions, as it seemed to be confusing the matter.