Hey there everyone,
I am currently working on a server program. Opens a port..listens for any requests from the client and then I have my N number of Threads pick up the tasks as they come in. I have implemented different policies for how the requests are handles(FIFO, SFF, etc) Now I want to get statistics about how my server does the work. Specifically,
I want to keep statistics on individual threads as they do work.
1. Count how many times the specific thread did a task
example:
2 threads
8 requests
how many times did thread 1 do work and how many times did thread 2 do work.
2. Count how many times the specific thread handled a "static" request.
3. Count how many times the specific thread handled a "dynamic" request.
I have created a structure with many attributes on the request itself, but I can't seem to figure out how to keep a counter going unless I can some how keep track on each thread structure, but I don't know how to go about doing that. Any help is appreciated thank you!
Is this a good enough explanation?