mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
* More instrumentation (statistics go to /nix/var/log/nix/downloads).
This commit is contained in:
parent
3745cecc6a
commit
35b76a81c4
1 changed files with 6 additions and 1 deletions
|
@ -13,7 +13,9 @@ open LOGFILE, ">>$logFile" or die "cannot open log file $logFile";
|
||||||
die unless scalar @ARGV == 1;
|
die unless scalar @ARGV == 1;
|
||||||
my $targetPath = $ARGV[0];
|
my $targetPath = $ARGV[0];
|
||||||
|
|
||||||
print LOGFILE "$$ get $targetPath\n";
|
my $date = `date`;
|
||||||
|
chomp $date;
|
||||||
|
print LOGFILE "$$ get $targetPath $date\n";
|
||||||
|
|
||||||
|
|
||||||
# Load all manifests.
|
# Load all manifests.
|
||||||
|
@ -110,6 +112,9 @@ while ($queueFront < scalar @queue) {
|
||||||
foreach my $narFile (@{$narFileList}) {
|
foreach my $narFile (@{$narFileList}) {
|
||||||
print " NAR from $narFile->{url}\n";
|
print " NAR from $narFile->{url}\n";
|
||||||
addEdge "start", $u, $narFile->{size}, "narfile", $narFile;
|
addEdge "start", $u, $narFile->{size}, "narfile", $narFile;
|
||||||
|
if ($u eq $targetPath) {
|
||||||
|
print LOGFILE "$$ full-download-would-be $narFile->{size}\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue