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

Add perfmon raw counter values calculations #3972

Merged
merged 2 commits into from
Apr 25, 2017

Conversation

martinscholz83
Copy link
Contributor

This PR adds functions to calculate performance counters from raw values. These functions should serve more as internal apis. For example needed here #3798. For using these functions see the added test.

@elasticmachine
Copy link
Collaborator

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run.

1 similar comment
@elasticmachine
Copy link
Collaborator

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run.

t.Fatal(err)
}

value, err := PdhCalculateCounterFromRawValue(query.counters[processorTimeCounter], PdhFmtDouble|PdhFmtNoCap100, rawvalue2, rawvalue1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we abstract these calls behind the Query API?

And what is the use case for these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use for this raw data is to calculate with them instead of using PdhCalculateCounterFromRawValue. See W2K3 SDK beginning at site 4629 for more example. I don't know whether it make sense to offer this API. In the example above i use PdhCalculateCounterFromRawValue which is in fact the same as PdhGetFormattedCounterValue i think.

@andrewkroh
Copy link
Member

jenkins, test it

@monicasarbu monicasarbu merged commit de11679 into elastic:master Apr 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants