Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to scale counters when multiplexing happens #5

Open
mahendrapaipuri opened this issue Nov 2, 2024 · 0 comments
Open

Unable to scale counters when multiplexing happens #5

mahendrapaipuri opened this issue Nov 2, 2024 · 0 comments

Comments

@mahendrapaipuri
Copy link

Hello,

Firstly, thanks a lot for this lib which is a very convenient wrapper for managing perf counters from Go clients.

I have noticed that the way TimeRunning and TimeEnabled counters are exposed for different profilers is inconsistent. Infact each event keeps track of its own running and enabled times as rightly implemented here. However, when a process is being profiled this information is wrongly presented.

Take an example of HardwareProfiler where TimeEnabled and TimeRunning is set to one of the event's times values and ignoring the times values of the rest of events. Moreover profilers is a map where order is undefined. So, the first time we profile, we might get times of CPUCyles where as the second profiling might returns the times of CPUInstr. In my tests, I have noticed that the times for different events can be different enough to break the monotonicity. Thus, we cannot scale the multiplexed values consistently.

A solution might be to export ProfileValue for each event instead of just ProfileValue.Value? In that way, times of each event are exported and we can scale them consistently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant