Object counter?

  • Thread starter Thread starter lyndon
  • Start date Start date
L

lyndon

I've done a lil reading about the performance counter MMC snapin and how it
operates.
But I'm really interested in tracking the number of instances of particular
objects so i can see what objects would be good
canidates for pooling. Could anyone point me to a good resource (google
didn't help)

Thanks,
Lyndon
 
Hi,

IT should be easy to implement, create a static int variable (you will have
to use lock to sync among threads) and increment/decrement it as needed

this may be a little primitive but may give you an idea.


Cheers,
 
Thanks Ignacio. I thought about doing this, but I was hoping that there was
a tool that accomplished this task.
Thanks,
Lyndon
 
I've done a lil reading about the performance counter MMC snapin and how
it
operates.
But I'm really interested in tracking the number of instances of particular
objects so i can see what objects would be good
canidates for pooling. Could anyone point me to a good resource (google
didn't help)

Look out for AllocationProfiler - a very useful tool that shows you a lots
of statistics about memory consumption and allocated objects of your app.
 
Hi lyndon,

If you only want to monitor the object count of your class, you can just
add a int value which is increased in your class constructor.

Do you have any obstacle to implement this? Have you resolved it yourself?

Please feel free to feedback, I will help you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi lyndon,

Do you still have any concern on this issue?

Please feel free to post. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top