From 677c5a2c4eb222cca9b740f10463c638fca3ada6 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 29 Dec 2025 14:40:10 -0600 Subject: [PATCH] update speedtest fs command --- .../common/nix_modules/essentials/default.nix | 2 ++ .../nix_modules/essentials/unix_utils.func.sh | 19 ++++++++++--- hosts/lio/flake.lock | 28 +++++++++---------- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/flakes/common/nix_modules/essentials/default.nix b/flakes/common/nix_modules/essentials/default.nix index e0ff89ea..12dcbf01 100644 --- a/flakes/common/nix_modules/essentials/default.nix +++ b/flakes/common/nix_modules/essentials/default.nix @@ -56,6 +56,8 @@ with lib; # ripgrep rg = "rg --no-ignore"; rgf = "rg --files --glob '!/nix/store/**' 2>/dev/null | rg"; + + speedtest_internet = "speedtest-cli"; }; environment.shellInit = lib.concatStringsSep "\n\n" [ diff --git a/flakes/common/nix_modules/essentials/unix_utils.func.sh b/flakes/common/nix_modules/essentials/unix_utils.func.sh index 2d48b401..a6c4907f 100644 --- a/flakes/common/nix_modules/essentials/unix_utils.func.sh +++ b/flakes/common/nix_modules/essentials/unix_utils.func.sh @@ -48,7 +48,7 @@ mail_clear() { : > /var/mail/$USER } -peedtest_fs () { +speedtest_fs () { dir=$(pwd) drive=$(df -h "${dir}" | awk 'NR==2 {print $1}') echo "Testing filesystem on: ${dir}" @@ -108,8 +108,19 @@ peedtest_fs () { --time_based \ --runtime="${runtime}" \ --group_reporting -} -speedtest_internet () { - speedtest-cli + echo + echo "=== Random read/write test (${runtime}s, 70% reads, 4k blocks) ===" + fio --name=randrw \ + --filename="${test_file}" \ + --rw=randrw \ + --rwmixread=70 \ + --bs=4k \ + --size="${file_size}" \ + --iodepth=32 \ + --direct=1 \ + --numjobs=4 \ + --time_based \ + --runtime="${runtime}" \ + --group_reporting } diff --git a/hosts/lio/flake.lock b/hosts/lio/flake.lock index 85d7d43f..2cdc3a7c 100644 --- a/hosts/lio/flake.lock +++ b/hosts/lio/flake.lock @@ -64,11 +64,11 @@ "common": { "locked": { "dir": "flakes/common", - "lastModified": 1766961967, - "narHash": "sha256-ccLRTjpQ3tqvNMMhCn02+WS74KE0i8bYLI/Jh4GdoiQ=", + "lastModified": 1767040555, + "narHash": "sha256-/YuefBcuLOtunUkDPUf9hj6iaLQvZjXKFgpwe9tDEdw=", "ref": "refs/heads/master", - "rev": "6b023457ec9053e748bc49ac3e28ea82e2f998d4", - "revCount": 975, + "rev": "663078098208707c9b20d762c42db5acd144e938", + "revCount": 991, "type": "git", "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" }, @@ -321,11 +321,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1766125104, - "narHash": "sha256-l/YGrEpLromL4viUo5GmFH3K5M1j0Mb9O+LiaeCPWEM=", + "lastModified": 1766870016, + "narHash": "sha256-fHmxAesa6XNqnIkcS6+nIHuEmgd/iZSP/VXxweiEuQw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7d853e518814cca2a657b72eeba67ae20ebf7059", + "rev": "5c2bc52fb9f8c264ed6c93bd20afa2ff5e763dce", "type": "github" }, "original": { @@ -1237,11 +1237,11 @@ }, "locked": { "dir": "flakes/opencode", - "lastModified": 1766965969, - "narHash": "sha256-uKxbAXX9bLzl7j4D0REN+JNntINdk/e/ry5a6hSqW0I=", + "lastModified": 1767029710, + "narHash": "sha256-MqilsCw9R5Rnq6qFBVctn/WtYO6vA8Rlt14tgKiIC/s=", "ref": "refs/heads/master", - "rev": "34e37861a716ee5e3498900bc4639a715bcc4adc", - "revCount": 981, + "rev": "3f8232e8f98713bc74c8f4ace0694cdc19ae2d3d", + "revCount": 988, "type": "git", "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" }, @@ -1256,11 +1256,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1766426038, - "narHash": "sha256-3TxsJjL5M83q9nOa4ls6rWfbECYUE6llzBAgqCYQml8=", + "lastModified": 1767028968, + "narHash": "sha256-Z6Jk9Ee3+KHaQf7V/zbHHgotZ0gQA5Mtqpzs8PAQmBY=", "owner": "sst", "repo": "opencode", - "rev": "6baee0791f48bcf32eef1e199d0cadca57772b9b", + "rev": "b7ce46f7a12e68283d6588c33aaf972426ddd65e", "type": "github" }, "original": {