Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

TypePerf issues #24

@herve-r

Description

@herve-r

Hello,

I am currently using collectm in a project for my company, and I had some issues when using performance counters to gather data. If you put 2 or more counters that does not exist, collectm will scramble data, and some counters that does not exist will be monitored while some that exist and should be monitored have no data or get wrong data. After reading the code of the TypePerf module, I found two causes for this issue:

  • The first one is the behaviour of the TypePerf command you're using to gather data from performance counters: if you put multi-instance counters that exist but for an instance that does not exist, TypePerf will not tell you that it is sending data for this counter. Here is an example:

typeperfexample

  • The second is the fact that the TypePerf module is using indexes to remove counters when they are not available. When removing the counters, it is not taking into account the fact that it is removing counters, and thus changing the indexes of the counters after the one that has been removed. Here is a schema to illustrate that:

typeperforiginalversion

In step 1: get the indexes of the elements to remove (elements in red) step 2 to 4: remove the elements one by one form left to right

I already found how to fix those issues, and if you are ok with that, I can try to push my fix into your repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions