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

Use perflib for system collector #405

Merged
merged 1 commit into from
Oct 9, 2019
Merged

Use perflib for system collector #405

merged 1 commit into from
Oct 9, 2019

Conversation

breed808
Copy link
Contributor

Migrate system collector to perflib. Perflib output is a bit nicer as SystemUpTime no longer needs to be calculated.

Copy link
Collaborator

@carlpett carlpett left a comment

Choose a reason for hiding this comment

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

Same minor name change as the others.

collector/system.go Outdated Show resolved Hide resolved
)
ch <- prometheus.MustNewConstMetric(
c.SystemUpTime,
prometheus.GaugeValue,
// convert from Windows timestamp (1 jan 1601) to unix timestamp (1 jan 1970)
float64(dst[0].SystemUpTime-116444736000000000)/float64(dst[0].Frequency_Object),
Copy link
Collaborator

Choose a reason for hiding this comment

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

🎉

@carlpett carlpett merged commit 7611e33 into prometheus-community:master Oct 9, 2019
@carlpett
Copy link
Collaborator

carlpett commented Oct 9, 2019

Thanks!

@breed808 breed808 deleted the perf_system branch October 9, 2019 22:43
anubhavg-icpl pushed a commit to anubhavg-icpl/windows_exporter that referenced this pull request Sep 22, 2024
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

Successfully merging this pull request may close these issues.

2 participants