(╯°□°)╯︵ ┻━┻
(┛◉Д◉)┛彡┻━┻
(ノ≧∇≦)ノ ミ ┸━┸
(ノಠ益ಠ)ノ彡┻━┻
(╯ರ ~ ರ)╯︵ ┻━┻
#!/usr/bin/env bash | |
## Output the memory usage of a pid and measure the change. | |
set -euo pipefail | |
pid=$1 | |
last_usage_mb=0 | |
while true; do | |
mem_usage=$(ps -p "$pid" -o size=) |
#!/usr/bin/env bash | |
# MIT License | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
(╯°□°)╯︵ ┻━┻
(┛◉Д◉)┛彡┻━┻
(ノ≧∇≦)ノ ミ ┸━┸
(ノಠ益ಠ)ノ彡┻━┻
(╯ರ ~ ರ)╯︵ ┻━┻
Minimum supported rust version (MSRV) policy that indicates the most recent stable rust release is the minimum whenever a new crate version is published. It is not required to bump a crate's major version after a new stable compiler is released.
For example crate_foo version 0.1.2
published on 2018-12-28 has MSRV 1.31.1
as this compiler was published on 2018-12-20.
The advantages of this approach is simplicity in maintaining a crate's code.
If you are unable to update your compiler, you may be unable to update crate dependencies following this policy.
#!/usr/bin/env bash | |
## Deletes ~/.cargo cached data older than 2 weeks | |
set -eu | |
du_before=$(du -hd0 ~/.cargo/ | cut -f1) | |
# remove old crate caches & sources | |
find ~/.cargo/registry/cache/ -type f -ctime +13 -atime +13 -delete |
#!/usr/bin/env bash | |
# shellcheck disable=SC2086 | |
set -euo pipefail | |
if [ "${1:-}" == "--help" ] || [ "${1:-}" == "-h" ]; then | |
echo "Micro-benchmarks helper using: cargo +nightly bench" | |
echo " Setup a control / starting values to compare against" | |
echo " $ rustbench --control" | |
echo |