my $cert = 'certs/server-cert.pem';
my $key = 'certs/server-key.pem';
if ($test_tls && !-r $key || !-r $cert) {
- plan skip_all => "certs/ missing for $0, run ./certs/create-certs.perl";
+ plan skip_all => "certs/ missing for $0, run $^X ./certs/create-certs.perl";
}
require './t/common.perl';
my $keep_tmp = !!$ENV{TEST_KEEP_TMP};
}
}
}
+
+ # hacky bytes_read thing added to Net::NNTP for testing:
+ my $bytes_read = '';
+ if ($nntp->can('bytes_read')) {
+ $bytes_read .= ' '.$nntp->bytes_read.'b';
+ }
my $q = $nntp->quit;
print STDERR "# quit failed: ".$nntp->code."\n" if !$q;
my $elapsed = sprintf('%0.3f', clock_gettime(CLOCK_MONOTONIC) - $t0);
my $res = $dig->hexdigest;
- print STDERR "# $desc - $res (${elapsed}s)\n";
+ print STDERR "# $desc - $res (${elapsed}s)$bytes_read\n";
$res;
}
my @tests = ([]);
sub make_local_server {
require PublicInbox::Inbox;
$group = 'inbox.test.perf.nntpd';
- my $ibx = { mainrepo => $inbox_dir, newsgroup => $group };
+ my $ibx = { inboxdir => $inbox_dir, newsgroup => $group };
$ibx = PublicInbox::Inbox->new($ibx);
my $nntpd = 'blib/script/public-inbox-nntpd';
my $pi_config = "$tmpdir/config";
print $fh <<"" or die "print $pi_config: $!";
[publicinbox "test"]
newsgroup = $group
- mainrepo = $inbox_dir
+ inboxdir = $inbox_dir
address = test\@example.com
close $fh or die "close($pi_config): $!";