[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: git version and automake 1.10b question
From: |
Jim Meyering |
Subject: |
Re: git version and automake 1.10b question |
Date: |
Thu, 02 Apr 2009 13:44:44 +0200 |
Pádraig Brady wrote:
> Jim Meyering wrote:
>
>> diff --git a/README-prereq b/README-prereq
>> - $ cd automake && ./configure --prefix=$HOME/coreutils/deps
>> + $ cd automake
>> + $ git checkout --track origin/next -b next
>> + $ ./configure --prefix=$HOME/coreutils/deps
>
> I needed to switch the git checkout parameters around
> with my version of git (1.5.3.6), i.e.:
>
> git checkout -b next --track origin/next
Thanks.
How about this?
>From b1332b9b429dfa9a8bba7286a78bbc7e37a2e419 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 2 Apr 2009 12:35:08 +0200
Subject: [PATCH] tests: make sort-benchmark-random more efficient, then use a
larger test
* tests/misc/sort-benchmark-random: cut 75% off run time, then
increase input size by a factor of 10, so that sort runs for more
than 1 second on fast hardware.
---
tests/misc/sort-benchmark-random | 42 +++++++++++++++++++-------------------
1 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/tests/misc/sort-benchmark-random b/tests/misc/sort-benchmark-random
index 2bace4f..0c4d61d 100755
--- a/tests/misc/sort-benchmark-random
+++ b/tests/misc/sort-benchmark-random
@@ -34,33 +34,33 @@ export LC_ALL
fail=0
perl -e '
-my $num_lines = 500000;
+my $num_lines = 5000000;
my $length = 100;
+# Only the first few bytes of each line need to be random.
+# the remaining bytes are solely to simulate a more realistic work load.
+my $rand_bytes = 5; # per line, so that 94^5 >> $num_lines
+
+my @line;
for (my $i=0; $i < $num_lines; $i++)
{
- for (my $j=0; $j < $length; $j++)
- {
- printf "%c", 32 + rand(94);
- }
- print "\n";
-}' > in || framework_failure
-
-# We need to generate a lot of data for sort to show a noticeable
-# improvement in performance. Sorting it in PERL may take awhile.
-
-perl -e '
-open (FILE, "<in");
-my @list = <FILE>;
-print sort(@list);
-close (FILE);
-' > exp || framework_failure
-
-#start=$(date +%s)
+ my $line = join ("", map {chr(32+rand(94))} (1..$rand_bytes))
+ . ("0" x ($length - $rand_bytes)) . "\n";
+ print $line;
+ push @line, $line;
+}
+END {
+ open FH, ">", "exp" or die;
+ print FH sort @line;
+ close FH or die;
+}
+' > in || framework_failure
+
+start=$(date +%s)
time sort in > out || fail=1
-#duration=$(expr $(date +%s) - $start)
+duration=$(expr $(date +%s) - $start)
-#echo sorting the random data took $duration seconds
+echo sorting the random data took $duration seconds
compare out exp || fail=1
--
1.6.2.rc1.285.gc5f54
Re: git version and automake 1.10b question, Andreas Schwab, 2009/04/01