-
-
Save AlexDaniel/0cdb3211cfcae90c29da9330649171c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use HTTP::UserAgent; | |
sub foo($build) { | |
my $link = “https://whateverable.6lang.org/$build”; | |
my $ua = HTTP::UserAgent.new; | |
$ua.timeout = 10; | |
my $response = $ua.get: $link, :bin; | |
if $response.is-success { | |
my $claimed = $response.header.field(‘Content-Disposition’).values[0]; | |
my $filename = ($claimed ~~ /‘filename=’\s*(<.xdigit>+[‘.zst’|‘.lrz’])/)[0]; | |
say $filename; | |
spurt $filename, $response.content, :bin; | |
} else { | |
die $response.status-line; | |
} | |
} | |
use Telemetry; | |
say T<max-rss>.fmt(‘%.2f’) ÷ 1024 ~ ‘MiB maxrss – before doing anything!!’; | |
for <2016.09 2016.10 2016.11 2016.12 2017.01 2017.02 2017.03> { | |
foo $_; | |
say T<max-rss>.fmt(‘%.2f’) ÷ 1024 ~ ‘MiB maxrss ’; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103.25MiB maxrss – before doing anything!! | |
「4b32fcab2192054b82312cde4c235adda0b8ac4d.zst」 | |
1742.917969MiB maxrss | |
「eb3123e5e60fa1635ed1ee121cec1290c290044a.zst」 | |
1754.53125MiB maxrss | |
「f66f8be09c6023b3b53e32f7571ea536ad87b87f.zst」 | |
1754.53125MiB maxrss | |
「b2a3441749878e338b0861b14b3b9433cc902f42.zst」 | |
1827.464844MiB maxrss | |
「78980ed447cceff82f5efef16dbe9ee437aae809.zst」 | |
1842.933594MiB maxrss | |
「aa94ffc33712c6f3068c6472b79a74fa70aa7b2e.zst」 | |
1882.15625MiB maxrss | |
「a0a28432f54d608130f17247f9202f4c4939dfff.zst」 | |
1882.15625MiB maxrss |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks a bit better now: