[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v2.21-59-g3ba6c96
From: |
Jim Meyering |
Subject: |
grep branch, master, updated. v2.21-59-g3ba6c96 |
Date: |
Sun, 02 Aug 2015 14:29:23 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".
The branch, master has been updated
via 3ba6c9655a1c2465e6bd6e8453886eb579ee0eaa (commit)
via ce898d98d5ff0ffbd988c993d2b3f1e414a6df2a (commit)
via ccb6295d23669d5ee3bb2bbc37bf85873805d484 (commit)
from bfa9df03034ccfb65da9950cf1e1207faef1213c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=3ba6c9655a1c2465e6bd6e8453886eb579ee0eaa
commit 3ba6c9655a1c2465e6bd6e8453886eb579ee0eaa
Author: Jim Meyering <address@hidden>
Date: Sat Aug 1 14:38:30 2015 -0700
tests: mb-non-UTF8-performance: use new function
* tests/mb-non-UTF8-performance: Rewrite to use
the user-time measuring function in init.cfg.
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
index 42bb5b5..228361d 100755
--- a/tests/mb-non-UTF8-performance
+++ b/tests/mb-non-UTF8-performance
@@ -19,31 +19,20 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-require_timeout_
-require_hi_res_time_
fail=0
-yes $(printf '%078d' 0) | head -50000 > in || framework_failure_
-
-start=$(hi_res_time_)
-LC_ALL=C grep -i foobar in; st=$?
-stop=$(hi_res_time_)
-
-# Use a multiple of the LC_ALL=C duration as the timeout for the JP/EUC test.
-# A multiple of 3 seems to be enough for i5,i7, but AMD needs >25.
-# Use an integer; some 'timeout' implementations have trouble with
-# floating-point in JP_EUC locales.
-timeout=$(
- $AWK 'BEGIN { print 1 + int (30 * ('$stop' - '$start'))}' < /dev/null
-)
-
-test $st = 1 || fail=1
+# Make this large enough so that even on high-end systems
+# it incurs at least 5-10ms of user time.
+yes $(printf '%078d' 0) | head -400000 > in || framework_failure_
+ubyte_ms=$(LC_ALL=C user_time_ 1 grep -i foobar in) || fail=1
require_JP_EUC_locale_
+mbyte_ms=$(user_time_ 1 grep -i foobar in) || fail=1
-# Expect no match, i.e., exit status of 1. Anything else is an error.
-timeout $timeout grep -i foobar in; st=$?
-test $st = 1 || fail=1
+# The duration of the multi-byte run must be no more than 30 times
+# that of the single-byte one.
+# A multiple of 3 seems to be enough for i5,i7, but AMD needs >25.
+expr $ubyte_ms '<' $mbyte_ms / 30 && fail=1
Exit $fail
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=ce898d98d5ff0ffbd988c993d2b3f1e414a6df2a
commit 3ba6c9655a1c2465e6bd6e8453886eb579ee0eaa
Author: Jim Meyering <address@hidden>
Date: Sat Aug 1 14:38:30 2015 -0700
tests: mb-non-UTF8-performance: use new function
* tests/mb-non-UTF8-performance: Rewrite to use
the user-time measuring function in init.cfg.
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
index 42bb5b5..228361d 100755
--- a/tests/mb-non-UTF8-performance
+++ b/tests/mb-non-UTF8-performance
@@ -19,31 +19,20 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-require_timeout_
-require_hi_res_time_
fail=0
-yes $(printf '%078d' 0) | head -50000 > in || framework_failure_
-
-start=$(hi_res_time_)
-LC_ALL=C grep -i foobar in; st=$?
-stop=$(hi_res_time_)
-
-# Use a multiple of the LC_ALL=C duration as the timeout for the JP/EUC test.
-# A multiple of 3 seems to be enough for i5,i7, but AMD needs >25.
-# Use an integer; some 'timeout' implementations have trouble with
-# floating-point in JP_EUC locales.
-timeout=$(
- $AWK 'BEGIN { print 1 + int (30 * ('$stop' - '$start'))}' < /dev/null
-)
-
-test $st = 1 || fail=1
+# Make this large enough so that even on high-end systems
+# it incurs at least 5-10ms of user time.
+yes $(printf '%078d' 0) | head -400000 > in || framework_failure_
+ubyte_ms=$(LC_ALL=C user_time_ 1 grep -i foobar in) || fail=1
require_JP_EUC_locale_
+mbyte_ms=$(user_time_ 1 grep -i foobar in) || fail=1
-# Expect no match, i.e., exit status of 1. Anything else is an error.
-timeout $timeout grep -i foobar in; st=$?
-test $st = 1 || fail=1
+# The duration of the multi-byte run must be no more than 30 times
+# that of the single-byte one.
+# A multiple of 3 seems to be enough for i5,i7, but AMD needs >25.
+expr $ubyte_ms '<' $mbyte_ms / 30 && fail=1
Exit $fail
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=ccb6295d23669d5ee3bb2bbc37bf85873805d484
commit 3ba6c9655a1c2465e6bd6e8453886eb579ee0eaa
Author: Jim Meyering <address@hidden>
Date: Sat Aug 1 14:38:30 2015 -0700
tests: mb-non-UTF8-performance: use new function
* tests/mb-non-UTF8-performance: Rewrite to use
the user-time measuring function in init.cfg.
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
index 42bb5b5..228361d 100755
--- a/tests/mb-non-UTF8-performance
+++ b/tests/mb-non-UTF8-performance
@@ -19,31 +19,20 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-require_timeout_
-require_hi_res_time_
fail=0
-yes $(printf '%078d' 0) | head -50000 > in || framework_failure_
-
-start=$(hi_res_time_)
-LC_ALL=C grep -i foobar in; st=$?
-stop=$(hi_res_time_)
-
-# Use a multiple of the LC_ALL=C duration as the timeout for the JP/EUC test.
-# A multiple of 3 seems to be enough for i5,i7, but AMD needs >25.
-# Use an integer; some 'timeout' implementations have trouble with
-# floating-point in JP_EUC locales.
-timeout=$(
- $AWK 'BEGIN { print 1 + int (30 * ('$stop' - '$start'))}' < /dev/null
-)
-
-test $st = 1 || fail=1
+# Make this large enough so that even on high-end systems
+# it incurs at least 5-10ms of user time.
+yes $(printf '%078d' 0) | head -400000 > in || framework_failure_
+ubyte_ms=$(LC_ALL=C user_time_ 1 grep -i foobar in) || fail=1
require_JP_EUC_locale_
+mbyte_ms=$(user_time_ 1 grep -i foobar in) || fail=1
-# Expect no match, i.e., exit status of 1. Anything else is an error.
-timeout $timeout grep -i foobar in; st=$?
-test $st = 1 || fail=1
+# The duration of the multi-byte run must be no more than 30 times
+# that of the single-byte one.
+# A multiple of 3 seems to be enough for i5,i7, but AMD needs >25.
+expr $ubyte_ms '<' $mbyte_ms / 30 && fail=1
Exit $fail
-----------------------------------------------------------------------
Summary of changes:
tests/init.cfg | 28 ++++++++++++++++++++++++++++
tests/long-pattern-perf | 24 ++++++------------------
tests/mb-non-UTF8-performance | 29 +++++++++--------------------
3 files changed, 43 insertions(+), 38 deletions(-)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v2.21-59-g3ba6c96,
Jim Meyering <=