Skip to content

Commit

Permalink
released 1.0
Browse files Browse the repository at this point in the history
- refactored autotools usage
- updated manual page
- changed default accuracy to 4 from 5
- loads a .ugrep-indexer configuration file from the working or home directory
- outputs current indexing settings/options
- improved final indexing stats reporting
- option --check when used with --quiet is now quiet
  • Loading branch information
genivia-inc committed Apr 18, 2024
1 parent d988560 commit 8a42226
Show file tree
Hide file tree
Showing 20 changed files with 3,328 additions and 1,329 deletions.
15 changes: 10 additions & 5 deletions Makefile.in
Expand Up @@ -98,8 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_brotlilib.m4 \
$(top_srcdir)/m4/ax_check_zlib.m4 \
$(top_srcdir)/m4/ax_check_zstdlib.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
Expand Down Expand Up @@ -233,9 +232,9 @@ am__relativize = \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
DIST_ARCHIVES = $(distdir).tar.xz
DIST_TARGETS = dist-xz
# Exists only to be overridden by the user if desired.
AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
Expand All @@ -253,6 +252,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
Expand All @@ -265,9 +265,11 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
GREP = @GREP@
HAVE_CXX11 = @HAVE_CXX11@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand All @@ -291,9 +293,12 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PLATFORM = @PLATFORM@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_CXX = @PTHREAD_CXX@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
Expand All @@ -310,6 +315,7 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
Expand Down Expand Up @@ -631,7 +637,6 @@ dist-bzip2: distdir
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)

dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -69,7 +69,7 @@ mounting again to clear FS cache to record the effect of indexing:
src/ugrep.cpp

Searched 1317 files in 28 directories in 0.0487 seconds with 8 threads: 1 matching (0.07593%)
Skipped 1316 of 1317 files with indexes not matching any search patterns
Skipped 1316 of 1317 files with non-matching indexes

There is always some variance in the elapsed time with 0.0487 seconds the best
time of four search runs that produced a search time range of 0.0487 (21x speed
Expand Down Expand Up @@ -107,7 +107,7 @@ Indexed search is still a lot faster by 12x than non-indexed for this example,
with 16 files actually searched (15 false positives):

Searched 1317 files in 28 directories in 0.0722 seconds with 8 threads: 1 matching (0.07593%)
Skipped 1301 of 1317 files with indexes not matching any search patterns
Skipped 1301 of 1317 files with non-matching indexes

Regex patterns that are more complex than this example may have a higher false
positive rate naturally, which is the rate of files that are considered
Expand Down Expand Up @@ -149,8 +149,8 @@ slightly longer search times:
| `-8` | 0 | unch |
| `-9` | 0 | unch |

Accucacy `-5` is the default, which tends to work very well to search with
regex patterns of modest complexity.
Accuracy `-4` is the default (from `-5` previously in older releases), which
tends to work very well to search with regex patterns of modest complexity.

One word of caution. There is always a tiny bit of overhead to check the
indexes. This means that if all files are already cached in RAM, because files
Expand Down Expand Up @@ -255,7 +255,7 @@ files.

The size of the index files depends on the specified accuracy, with `-0` the
lowest (small index files) and `-9` the highest (large index files). The
default accuracy is `-5`. See the next Q for details on the impact of accuracy
default accuracy is `-4`. See the next Q for details on the impact of accuracy
on indexing size versus search speed.

Indexing *never follows symbolic links to directories*, because symbolically
Expand Down
40 changes: 1 addition & 39 deletions aclocal.m4
Expand Up @@ -20,44 +20,6 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])

# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_REQUIRE_DEFINED(MACRO)
#
# DESCRIPTION
#
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
# been defined and thus are available for use. This avoids random issues
# where a macro isn't expanded. Instead the configure script emits a
# non-fatal:
#
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
#
# It's like AC_REQUIRE except it doesn't expand the required macro.
#
# Here's an example:
#
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
#
# LICENSE
#
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 2

AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
])dnl AX_REQUIRE_DEFINED

# Copyright (C) 2002-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
Expand Down Expand Up @@ -1254,4 +1216,4 @@ m4_include([m4/ax_check_lzmalib.m4])
m4_include([m4/ax_check_zlib.m4])
m4_include([m4/ax_check_zstdlib.m4])
m4_include([m4/ax_cxx_compile_stdcxx.m4])
m4_include([m4/ax_cxx_compile_stdcxx_11.m4])
m4_include([m4/ax_pthread.m4])
Binary file modified bin/win32/ugrep-indexer.exe
Binary file not shown.
Binary file modified bin/win64/ugrep-indexer.exe
Binary file not shown.
10 changes: 10 additions & 0 deletions config.h.in
Expand Up @@ -34,6 +34,12 @@
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H

/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD

/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT

/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H

Expand Down Expand Up @@ -111,6 +117,10 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION

/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
#undef PTHREAD_CREATE_JOINABLE

/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
Expand Down

0 comments on commit 8a42226

Please sign in to comment.