项目作者: DrPeterVanNostrand

项目描述 :
A `cargo` subcommand for monitoring the ammount of memory locked by `cargo test`.
高级语言: Rust
项目地址: git://github.com/DrPeterVanNostrand/cargo-mlocktest.git
创建时间: 2018-09-03T19:07:49Z
项目社区:https://github.com/DrPeterVanNostrand/cargo-mlocktest

开源协议:

下载


cargo-mlocktest

A cargo subcommand to monitor the ammount of memory locked into RAM during
cargo test

Note: cargo-mlocktest only runs on Linux.

This subcommand is useful when debugging SIGILL segfaults that may arise
when testing rust programs that lock large ammounts of memory into RAM.

Usage

You can use this cargo subcommand by running the following:

  1. # Install the `mlocktest` subcommand:
  2. $ cd cargo-mlocktest
  3. $ cargo build
  4. $ cp target/debug/cargo-mlocktest ~/.cargo/bin/
  5. # Use the subcommand:
  6. $ cd <different rust project>
  7. $ cargo mlocktest
  8. # When you no longer need the subcommand, run the following to uninstall:
  9. $ rm ~/.cargo/bin/cargo-mlocktest

Output

Running cargo mlocktest will run cargo test, then output the following
table:

  1. Mlock Monitor for `cargo test`
  2. ===============================
  3. Locked memory limit (soft, kb): <your systems soft locked memory limit>
  4. Lock memory limit (hard, kb): <your systems hard locked memory limit>
  5. Running `cargo test` ... done!
  6. Process Name Max Locked Memory (kb)
  7. ============ ======================
  8. <test 1 binary name> <the max number of kbs locked during test 1>
  9. <test 2 binary name> <the max number of kbs locked during test 2>
  10. ...
  11. ==============================================================