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

fix: upgrade to procfs 0.12 #144

Merged
merged 3 commits into from
Dec 21, 2021
Merged

fix: upgrade to procfs 0.12 #144

merged 3 commits into from
Dec 21, 2021

Conversation

bpetit
Copy link
Contributor

@bpetit bpetit commented Dec 16, 2021

No description provided.

@bpetit bpetit linked an issue Dec 16, 2021 that may be closed by this pull request
@bpetit bpetit mentioned this pull request Dec 16, 2021
@@ -80,11 +80,11 @@ impl QemuExporter {
}
}
let tdiff = time_tdiff.total_time_jiffies()
* procfs::ticks_per_second().unwrap() as f32;
* procfs::ticks_per_second().unwrap() as u64;

Choose a reason for hiding this comment

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

Despite the name, the old total_time_jiffies function was actually returning the total number of seconds. This value was then multiplied by ticks_per_second to get the total number of ticks.

But now with the procfs upgrade, the total_time_jiffies function is directly returning the total number of ticks, so you don't need to multiply the result by ticks_per_second.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks !

@bpetit bpetit self-assigned this Dec 21, 2021
@bpetit bpetit changed the base branch from main to dev December 21, 2021 13:59
@bpetit bpetit merged commit cf1870e into dev Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Previous releases
Development

Successfully merging this pull request may close these issues.

Migrate to procfs 0.12.0
2 participants