ICU-4362 Add string search performance test template to repository.

X-SVN-Rev: 23799
This commit is contained in:
Michael Ow 2008-04-17 17:46:37 +00:00
parent 0cca2d6ee3
commit 67b4edc504
6 changed files with 134 additions and 1 deletions

3
.gitattributes vendored
View File

@ -81,6 +81,9 @@ icu4c/source/test/perf/collationperf/readme.html -text
icu4c/source/test/perf/collperf/CollPerf_r.pl -text
icu4c/source/test/perf/convperf/Makefile.in -text
icu4c/source/test/perf/perldriver/Common.pl -text
icu4c/source/test/perf/strsrchperf/Makefile.in -text
icu4c/source/test/perf/strsrchperf/strsrchperf.cpp -text
icu4c/source/test/perf/strsrchperf/strsrchperf.h -text
icu4c/source/test/testdata/TestFont1.otf -text
icu4c/source/test/testdata/icu26_testtypes.res -text
icu4c/source/test/testdata/icu26e_testtypes.res -text

View File

@ -8396,7 +8396,7 @@ then
CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS)"
fi
ac_config_files="$ac_config_files icudefs.mk Makefile data/icupkg.inc config/Makefile.inc data/Makefile stubdata/Makefile common/Makefile i18n/Makefile layout/Makefile layoutex/Makefile io/Makefile extra/Makefile extra/uconv/Makefile extra/scrptrun/Makefile tools/Makefile tools/ctestfw/Makefile tools/toolutil/Makefile tools/makeconv/Makefile tools/genrb/Makefile tools/genuca/Makefile tools/genccode/Makefile tools/gencmn/Makefile tools/gencnval/Makefile tools/genctd/Makefile tools/gennames/Makefile tools/gentest/Makefile tools/gennorm/Makefile tools/genprops/Makefile tools/gencase/Makefile tools/genbidi/Makefile tools/genpname/Makefile tools/genbrk/Makefile tools/gensprep/Makefile tools/icupkg/Makefile tools/icuswap/Makefile tools/pkgdata/Makefile tools/tzcode/Makefile test/Makefile test/compat/Makefile test/testdata/Makefile test/testdata/pkgdata.inc test/hdrtst/Makefile test/intltest/Makefile test/cintltst/Makefile test/iotest/Makefile test/letest/Makefile test/perf/Makefile test/perf/collationperf/Makefile test/perf/ubrkperf/Makefile test/perf/charperf/Makefile test/perf/convperf/Makefile test/perf/normperf/Makefile test/perf/unisetperf/Makefile test/perf/usetperf/Makefile test/perf/ustrperf/Makefile test/perf/utfperf/Makefile samples/Makefile samples/date/Makefile samples/cal/Makefile samples/layout/Makefile common/unicode/platform.h"
ac_config_files="$ac_config_files icudefs.mk Makefile data/icupkg.inc config/Makefile.inc data/Makefile stubdata/Makefile common/Makefile i18n/Makefile layout/Makefile layoutex/Makefile io/Makefile extra/Makefile extra/uconv/Makefile extra/scrptrun/Makefile tools/Makefile tools/ctestfw/Makefile tools/toolutil/Makefile tools/makeconv/Makefile tools/genrb/Makefile tools/genuca/Makefile tools/genccode/Makefile tools/gencmn/Makefile tools/gencnval/Makefile tools/genctd/Makefile tools/gennames/Makefile tools/gentest/Makefile tools/gennorm/Makefile tools/genprops/Makefile tools/gencase/Makefile tools/genbidi/Makefile tools/genpname/Makefile tools/genbrk/Makefile tools/gensprep/Makefile tools/icupkg/Makefile tools/icuswap/Makefile tools/pkgdata/Makefile tools/tzcode/Makefile test/Makefile test/compat/Makefile test/testdata/Makefile test/testdata/pkgdata.inc test/hdrtst/Makefile test/intltest/Makefile test/cintltst/Makefile test/iotest/Makefile test/letest/Makefile test/perf/Makefile test/perf/collationperf/Makefile test/perf/ubrkperf/Makefile test/perf/charperf/Makefile test/perf/convperf/Makefile test/perf/normperf/Makefile test/perf/strsrchperf/Makefile test/perf/unisetperf/Makefile test/perf/usetperf/Makefile test/perf/ustrperf/Makefile test/perf/utfperf/Makefile samples/Makefile samples/date/Makefile samples/cal/Makefile samples/layout/Makefile common/unicode/platform.h"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@ -8978,6 +8978,7 @@ do
"test/perf/usetperf/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/perf/usetperf/Makefile" ;;
"test/perf/ustrperf/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/perf/ustrperf/Makefile" ;;
"test/perf/utfperf/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/perf/utfperf/Makefile" ;;
"test/perf/strsrchperf/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/perf/collationperf/Makefile" ;;
"samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;;
"samples/date/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/date/Makefile" ;;
"samples/cal/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/cal/Makefile" ;;

View File

@ -1113,6 +1113,7 @@ AC_OUTPUT([icudefs.mk \
test/perf/charperf/Makefile \
test/perf/convperf/Makefile \
test/perf/normperf/Makefile \
test/perf/strsrchperf/Makefile \
test/perf/unisetperf/Makefile \
test/perf/usetperf/Makefile \
test/perf/ustrperf/Makefile \

View File

@ -0,0 +1,79 @@
## Makefile.in for ICU - test/perf/strsrchperf
## Copyright (c) 2008, International Business Machines Corporation and
## others. All Rights Reserved.
## Source directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../../..
include $(top_builddir)/icudefs.mk
## Build directory information
subdir = test/perf/strsrchperf
## Extra files to remove for 'make clean'
CLEANFILES = *~ $(DEPS)
## Target information
TARGET = strsrchperf
CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
OBJECTS = strsrchperf.o
DEPS = $(OBJECTS:.o=.d)
## List of phony targets
.PHONY : all all-local install install-local clean clean-local \
distclean distclean-local dist dist-local check check-local
## Clear suffix list
.SUFFIXES :
## List of standard targets
all: all-local
install: install-local
clean: clean-local
distclean : distclean-local
dist: dist-local
check: all check-local
all-local: $(TARGET)
install-local:
dist-local:
clean-local:
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
$(RMV) $(OBJECTS) $(TARGET)
distclean-local: clean-local
$(RMV) Makefile
check-local: all-local
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(TARGET) : $(OBJECTS)
$(LINK.cc) -o $@ $^ $(LIBS)
$(POST_BUILD_STEP)
invoke:
ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
ifeq (,$(MAKECMDGOALS))
-include $(DEPS)
else
ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
-include $(DEPS)
endif
endif
endif

View File

@ -0,0 +1,18 @@
/********************************************************************
* COPYRIGHT:
* Copyright (C) 2008 IBM, Inc. All Rights Reserved.
*
********************************************************************/
/**
* This program tests string search performance.
* APIs tested:
* ICU4C
*/
#include "strsrchperf.h"
int main (int argc, char** argv) {
printf("Done!\n");
return 0;
}

View File

@ -0,0 +1,31 @@
/********************************************************************
* COPYRIGHT:
* Copyright (C) 2008 IBM, Inc. All Rights Reserved.
*
********************************************************************/
#ifndef _STRSRCHPERF_H
#define _STRSRCHPERF_H
#include "unicode/uperf.h"
#include <stdlib.h>
#include <stdio.h>
class StringSearchPerfFunction : public UPerfFunction {
private:
public:
virtual void call(UErrorCode* status);
virtual long getOperationsPerIteration();
virtual long getEventsPerIteration();
};
class StringSearchPerformanceTest : public UPerfTest {
private:
public:
StringSearchPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status);
~StringSearchPerformanceTest();
virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = NULL);
};
#endif /* _STRSRCHPERF_H */