Performance functionality for Windows systems requirements - necto/denfer GitHub Wiki
This pages describes requirements to Windows performance counters(referred below as "perfcounters") as a part of the whole project("profiler")
The developed perfcounters should implement unified interface to various performance facilities available on Windows machine being used.
- Detect available and supported performance measuring facilities on local host machine.
- There should be a method to list them.
- If there are any restrictions on usage of them that should be mentioned.
- Attaching to running process specified by profiler.
- Using available performance facilities within allowed restrictions.
- Gathering and returning required statistics about running process.
- These statistics include:
- Function call counters
Profiling itself is performed through creating performance counters and 'attaching' them to measured process. Many performance counters may be attached to single process and operate simultaneously, but only one process could be measured by single counter. Moreover there should be possibility to attach performance counters to many processes. /*Managing of performance counters interactions with process and each other(explicitly or implicitly) is done with static common interface.*/
Each of performance counters may have specific methods or define own data structures to pass information back to profiler. But they all should have in common following methods:
- Create&attach (constructor) - initialize given perf counter and associate with running process.
- Detach&kill(destructor) - deassociate and clean up.
- Start/stop counting - initiate single session of collecting performance data from running process.
- Get counter values - obtain internally collected data for external use. Data should be passed through externally created data structure of specific type.
- Reset - forget all collected data.
Stability, code conventions and documentation requirements are inherited from global requirements for the project.