X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=xt%2Fgit_async_cmp.t;h=f9c9ddefeb0cb23240397ebf58b5282e4da8910f;hb=256b3566e4d57a64bb349a7b896da10381a2a363;hp=f8ffe3d9e10a34ae06dfa0f76e8a9136962e0edc;hpb=46baf956987dca495ed44b1050e64939fae5c8ab;p=public-inbox.git
diff --git a/xt/git_async_cmp.t b/xt/git_async_cmp.t
index f8ffe3d9..f9c9ddef 100644
--- a/xt/git_async_cmp.t
+++ b/xt/git_async_cmp.t
@@ -1,5 +1,5 @@
#!perl -w
-# Copyright (C) 2019 all contributors
+# Copyright (C) 2019-2020 all contributors
# License: AGPL-3.0+
use strict;
use Test::More;
@@ -18,6 +18,7 @@ if (require_git(2.19, 1)) {
}
my @dig;
my $nr = $ENV{NR} || 1;
+diag "NR=$nr";
my $async = timeit($nr, sub {
my $dig = Digest::SHA->new(1);
my $cb = sub {
@@ -25,9 +26,8 @@ my $async = timeit($nr, sub {
$dig->add($$bref);
};
my $cat = $git->popen(@cat);
- $git->cat_async_begin;
- foreach (<$cat>) {
+ while (<$cat>) {
my ($oid, undef, undef) = split(/ /);
$git->cat_async($oid, $cb);
}
@@ -39,7 +39,7 @@ my $async = timeit($nr, sub {
my $sync = timeit($nr, sub {
my $dig = Digest::SHA->new(1);
my $cat = $git->popen(@cat);
- foreach (<$cat>) {
+ while (<$cat>) {
my ($oid, undef, undef) = split(/ /);
my $bref = $git->cat_file($oid);
$dig->add($$bref);