-
-
Save AlexDaniel/c86673983fe6c1f7eb8451cd91a8f335 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; | |
use Telemetry; | |
sub foo($build) { | |
my $ua = HTTP::UserAgent.new; | |
$ua.timeout = 10; | |
my $response = $ua.get: “https://whateverable.6lang.org/$build”, :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; | |
} | |
} | |
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 ’; | |
use nqp; nqp::force_gc(); | |
say T<max-rss>.fmt(‘%.2f’) ÷ 1024 ~ ‘MiB maxrss – after force_gc’; | |
} |
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
104.113281MiB maxrss – before doing anything!! | |
「4b32fcab2192054b82312cde4c235adda0b8ac4d.zst」 | |
1734.730469MiB maxrss | |
1734.730469MiB maxrss – after force_gc | |
「eb3123e5e60fa1635ed1ee121cec1290c290044a.zst」 | |
1734.730469MiB maxrss | |
1734.730469MiB maxrss – after force_gc | |
「f66f8be09c6023b3b53e32f7571ea536ad87b87f.zst」 | |
1765.121094MiB maxrss | |
1765.121094MiB maxrss – after force_gc | |
「b2a3441749878e338b0861b14b3b9433cc902f42.zst」 | |
1794.269531MiB maxrss | |
1794.269531MiB maxrss – after force_gc | |
「78980ed447cceff82f5efef16dbe9ee437aae809.zst」 | |
1827.550781MiB maxrss | |
1827.550781MiB maxrss – after force_gc | |
「aa94ffc33712c6f3068c6472b79a74fa70aa7b2e.zst」 | |
1857.207031MiB maxrss | |
1857.207031MiB maxrss – after force_gc | |
「a0a28432f54d608130f17247f9202f4c4939dfff.zst」 | |
1859.015625MiB maxrss | |
1859.015625MiB maxrss – after force_gc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment