pkgs/curl-timings: Add curl shortcut to show connection timings
This commit is contained in:
16
pkgs/curl-timings/curl-timings.sh
Executable file
16
pkgs/curl-timings/curl-timings.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
curl -w "Request to %{url}
|
||||
|
||||
time_namelookup: %{time_namelookup}s
|
||||
time_connect: %{time_connect}s
|
||||
time_appconnect: %{time_appconnect}s
|
||||
time_pretransfer: %{time_pretransfer}s
|
||||
time_starttransfer: %{time_starttransfer}s
|
||||
time_posttransfer: %{time_posttransfer}s
|
||||
time_queue: %{time_queue}s
|
||||
time_redirect: %{time_redirect}s
|
||||
time_starttransfer: %{time_starttransfer}s
|
||||
|
||||
time_total: %{time_total}s
|
||||
" -o /dev/null -s "$@"
|
12
pkgs/curl-timings/default.nix
Normal file
12
pkgs/curl-timings/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
curl,
|
||||
writeShellApplication,
|
||||
}:
|
||||
|
||||
writeShellApplication {
|
||||
name = "curl-timings";
|
||||
text = builtins.readFile ./curl-timings.sh;
|
||||
runtimeInputs = [
|
||||
curl
|
||||
];
|
||||
}
|
@@ -12,6 +12,7 @@ final: prev: {
|
||||
clerie-sops-edit = final.callPackage ./clerie-sops/clerie-sops-edit.nix {};
|
||||
clerie-update-nixfiles = final.callPackage ./clerie-update-nixfiles/clerie-update-nixfiles.nix {};
|
||||
chromium-incognito = final.callPackage ./chromium-incognito {};
|
||||
curl-timings = final.callPackage ./curl-timings {};
|
||||
factorio-launcher = final.callPackage ./factorio-launcher {};
|
||||
feeds-dir = final.callPackage ./feeds-dir {};
|
||||
generate-blocked-prefixes = final.callPackage ./generate-blocked-prefixes {};
|
||||
|
Reference in New Issue
Block a user