mirror of
https://github.com/nushell/nushell
synced 2025-01-27 20:35:43 +00:00
Bump procfs from 0.14.1 to 0.15.1 (#8233)
Bumps [procfs](https://github.com/eminence/procfs) from 0.14.1 to 0.15.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/eminence/procfs/releases">procfs's releases</a>.</em></p> <blockquote> <h2>v0.15.1</h2> <h2>New features</h2> <ul> <li>Change Stat::comm documentation by <a href="https://github.com/rust1248"><code>@rust1248</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/251">eminence/procfs#251</a></li> <li>Add docs and a as_str method to MMPermission by <a href="https://github.com/eminence"><code>@eminence</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/252">eminence/procfs#252</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/rust1248"><code>@rust1248</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/251">eminence/procfs#251</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/eminence/procfs/compare/v0.15.0...v0.15.1">https://github.com/eminence/procfs/compare/v0.15.0...v0.15.1</a></p> <h2>v0.15.0</h2> <h2>New Features</h2> <ul> <li>Add /proc/iomem by <a href="https://github.com/tatref"><code>@tatref</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/216">eminence/procfs#216</a></li> <li>Add new functions to read various net files for a specific process by <a href="https://github.com/eminence"><code>@eminence</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/226">eminence/procfs#226</a></li> <li>add /proc/kpageflags by <a href="https://github.com/tatref"><code>@tatref</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/233">eminence/procfs#233</a></li> <li>Enable oppportunistic fd counting fast path by <a href="https://github.com/bobrik"><code>@bobrik</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/234">eminence/procfs#234</a></li> <li>add /proc/kpagecount by <a href="https://github.com/tatref"><code>@tatref</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/232">eminence/procfs#232</a></li> <li>Add new <code>/proc/meminfo</code> fields. by <a href="https://github.com/afranchuk"><code>@afranchuk</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/238">eminence/procfs#238</a></li> <li>impl Hash for kernel version by <a href="https://github.com/tatref"><code>@tatref</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/240">eminence/procfs#240</a></li> </ul> <h2>Bug fixes</h2> <ul> <li>fix chrono::Local::timestamp deprecated in chrono 0.4.23 by <a href="https://github.com/tatref"><code>@tatref</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/220">eminence/procfs#220</a></li> <li>Fix some minor documentation issues by <a href="https://github.com/eminence"><code>@eminence</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/225">eminence/procfs#225</a></li> <li>Fixes the reported path when a task's function returns an error by <a href="https://github.com/eminence"><code>@eminence</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/230">eminence/procfs#230</a></li> <li>fix shm size type by <a href="https://github.com/tatref"><code>@tatref</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/243">eminence/procfs#243</a></li> </ul> <h2>Breaking changes</h2> <ul> <li>ticks_per_second and page_size are infallible by <a href="https://github.com/eminence"><code>@eminence</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/235">eminence/procfs#235</a></li> <li>parse uid for /proc/net/{tcp,udp} by <a href="https://github.com/trinity-1686a"><code>@trinity-1686a</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/231">eminence/procfs#231</a></li> <li>Refactor and expose memory map processing. by <a href="https://github.com/afranchuk"><code>@afranchuk</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/237">eminence/procfs#237</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/trinity-1686a"><code>@trinity-1686a</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/231">eminence/procfs#231</a></li> <li><a href="https://github.com/afranchuk"><code>@afranchuk</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/238">eminence/procfs#238</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/eminence/procfs/compare/v0.14.2...v0.15.0">https://github.com/eminence/procfs/compare/v0.14.2...v0.15.0</a></p> <h2>MSRV Note</h2> <p>This <code>v0.15</code> release is only tested against the latest stable rust compiler, but is known to work with older versions (down to rust 1.48). Support for these older compilers may break in <code>procfs</code> patch releases. See also <a href="https://github-redirect.dependabot.com/eminence/procfs/issues/223">#223</a></p> <h2>v0.14.2</h2> <h2>New Features</h2> <ul> <li>Process: Namespace: Use openat instead of building a path by <a href="https://github.com/arilou"><code>@arilou</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/192">eminence/procfs#192</a></li> <li>add serde serialize/deserialize derives for public types by <a href="https://github.com/eliad-wiz"><code>@eliad-wiz</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/193">eminence/procfs#193</a></li> <li>Disabling default features on the <code>chrono</code> crate by <a href="https://github.com/Will-Low"><code>@Will-Low</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/210">eminence/procfs#210</a></li> <li>Implement smaps_rollup by <a href="https://github.com/TaborKelly"><code>@TaborKelly</code></a> in <a href="https://github-redirect.dependabot.com/eminence/procfs/pull/214">eminence/procfs#214</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="16ccc15aa1
"><code>16ccc15</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/eminence/procfs/issues/253">#253</a> from eminence/v0_15_1</li> <li><a href="4b5b61a89d
"><code>4b5b61a</code></a> Version 0.15.1</li> <li><a href="b7f66d5a8c
"><code>b7f66d5</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/eminence/procfs/issues/252">#252</a> from eminence/mmperms</li> <li><a href="af961235ff
"><code>af96123</code></a> Add docs and a as_str method to MMPermission</li> <li><a href="6c6ddbd42e
"><code>6c6ddbd</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/eminence/procfs/issues/251">#251</a> from rust1248/task/fix-comm-docs</li> <li><a href="7e7afab4f8
"><code>7e7afab</code></a> Change Stat::comm documentation</li> <li><a href="391bd13a0a
"><code>391bd13</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/eminence/procfs/issues/247">#247</a> from eminence/statat_nofollow</li> <li><a href="d0a7c09304
"><code>d0a7c09</code></a> Don't use SYMLINK_NOFOLLOW in a statat call</li> <li><a href="940c163242
"><code>940c163</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/eminence/procfs/issues/248">#248</a> from eminence/criterion_update</li> <li><a href="0e31f6c8ee
"><code>0e31f6c</code></a> Update criterion dev-depencency</li> <li>Additional commits viewable in <a href="https://github.com/eminence/procfs/compare/v0.14.1...v0.15.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=procfs&package-manager=cargo&previous-version=0.14.1&new-version=0.15.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
This commit is contained in:
parent
a3f817d71b
commit
c358400351
3 changed files with 40 additions and 11 deletions
44
Cargo.lock
generated
44
Cargo.lock
generated
|
@ -1268,7 +1268,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "e11dcc7e4d79a8c89b9ab4c6f5c30b1fc4a83c420792da3542fd31179ed5f517"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"rustix",
|
||||
"rustix 0.35.11",
|
||||
"windows-sys 0.36.1",
|
||||
]
|
||||
|
||||
|
@ -1884,6 +1884,16 @@ version = "0.7.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ea37f355c05dde75b84bba2d767906ad522e97cd9e2eef2be7a4ab7fb442c06"
|
||||
|
||||
[[package]]
|
||||
name = "io-lifetimes"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ipnet"
|
||||
version = "2.5.0"
|
||||
|
@ -2189,6 +2199,12 @@ version = "0.0.46"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.9"
|
||||
|
@ -3943,9 +3959,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "procfs"
|
||||
version = "0.14.1"
|
||||
version = "0.15.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2dfb6451c91904606a1abe93e83a8ec851f45827fa84273f256ade45dc095818"
|
||||
checksum = "943ca7f9f29bab5844ecd8fdb3992c5969b6622bb9609b9502fef9b4310e3f1f"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"byteorder",
|
||||
|
@ -3953,7 +3969,7 @@ dependencies = [
|
|||
"flate2",
|
||||
"hex",
|
||||
"lazy_static",
|
||||
"rustix",
|
||||
"rustix 0.36.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4464,12 +4480,26 @@ checksum = "fbb2fda4666def1433b1b05431ab402e42a1084285477222b72d6c564c417cef"
|
|||
dependencies = [
|
||||
"bitflags",
|
||||
"errno 0.2.8",
|
||||
"io-lifetimes",
|
||||
"io-lifetimes 0.7.3",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"linux-raw-sys 0.0.46",
|
||||
"windows-sys 0.36.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.36.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"errno 0.2.8",
|
||||
"io-lifetimes 1.0.5",
|
||||
"libc",
|
||||
"linux-raw-sys 0.1.4",
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.9"
|
||||
|
@ -5138,7 +5168,7 @@ version = "0.2.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8440c860cf79def6164e4a0a983bcc2305d82419177a0e0c71930d049e3ac5a1"
|
||||
dependencies = [
|
||||
"rustix",
|
||||
"rustix 0.35.11",
|
||||
"windows-sys 0.36.1",
|
||||
]
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ nix = { version = "0.25", default-features = false, features = ["fs", "term", "p
|
|||
atty = "0.2"
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
||||
procfs = "0.14.0"
|
||||
procfs = "0.15.1"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
libproc = "0.12.0"
|
||||
|
|
|
@ -190,8 +190,7 @@ impl ProcessInfo {
|
|||
let curr_time = cs.utime + cs.stime;
|
||||
let prev_time = ps.utime + ps.stime;
|
||||
|
||||
let usage_ms =
|
||||
(curr_time - prev_time) * 1000 / procfs::ticks_per_second().unwrap_or(100);
|
||||
let usage_ms = (curr_time - prev_time) * 1000 / procfs::ticks_per_second();
|
||||
let interval_ms =
|
||||
self.interval.as_secs() * 1000 + u64::from(self.interval.subsec_millis());
|
||||
usage_ms as f64 * 100.0 / interval_ms as f64
|
||||
|
@ -206,7 +205,7 @@ impl ProcessInfo {
|
|||
/// Memory size in number of bytes
|
||||
pub fn mem_size(&self) -> u64 {
|
||||
match self.curr_proc.stat() {
|
||||
Ok(p) => p.rss_bytes().unwrap_or(0),
|
||||
Ok(p) => p.rss_bytes(),
|
||||
Err(_) => 0,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue