activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r553849 - in /activemq/activemq-cpp/trunk/src/test-benchmarks: ./ activemq/ activemq/util/ benchmark/
Date Fri, 06 Jul 2007 11:50:20 GMT
Author: tabish
Date: Fri Jul  6 04:50:18 2007
New Revision: 553849

URL: http://svn.apache.org/viewvc?view=rev&rev=553849
Log:
Adding a benchmarks test app so we can test the performance of a class in amq-cpp on multiple
platforms and compare times.  Using it as an optimization aid to tweak performance as well.

Added:
    activemq/activemq-cpp/trunk/src/test-benchmarks/
    activemq/activemq-cpp/trunk/src/test-benchmarks/Makefile.am
    activemq/activemq-cpp/trunk/src/test-benchmarks/Makefile.in
    activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/
    activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/
    activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.cpp
    activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.h
    activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/
    activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/BenchmarkBase.h
    activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/PerformanceTimer.cpp
    activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/PerformanceTimer.h
    activemq/activemq-cpp/trunk/src/test-benchmarks/main.cpp
    activemq/activemq-cpp/trunk/src/test-benchmarks/testRegistry.cpp

Added: activemq/activemq-cpp/trunk/src/test-benchmarks/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-benchmarks/Makefile.am?view=auto&rev=553849
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-benchmarks/Makefile.am (added)
+++ activemq/activemq-cpp/trunk/src/test-benchmarks/Makefile.am Fri Jul  6 04:50:18 2007
@@ -0,0 +1,38 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+cc_sources = \
+  activemq/util/PrimitiveMapBenchmark.cpp \
+  benchmark/PerformanceTimer.cpp \
+  testRegistry.cpp \
+  main.cpp
+
+hh_sources = \
+  activemq/util/PerformanceTimer.h \
+  benchmark/BenchmarkBase.h \
+  benchmark/PerformanceTimer.h
+
+## Compile this as part of make check
+check_PROGRAMS = activemq-test-benchmarks
+
+## 
+## Compiler/Linker Options
+##
+activemq_test_benchmarks_SOURCES = $(cc_sources)
+activemq_test_benchmarks_CXXFLAGS = -Wno-non-virtual-dtor -Wno-unused-parameter -Wno-uninitialized
-I$(srcdir)/../main @CPPUNIT_CFLAGS@
+activemq_test_benchmarks_LDADD= ../main/libactivemq-cpp.la @CPPUNIT_LIBS@
+

Added: activemq/activemq-cpp/trunk/src/test-benchmarks/Makefile.in
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-benchmarks/Makefile.in?view=auto&rev=553849
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-benchmarks/Makefile.in (added)
+++ activemq/activemq-cpp/trunk/src/test-benchmarks/Makefile.in Fri Jul  6 04:50:18 2007
@@ -0,0 +1,566 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = activemq-test-benchmarks$(EXEEXT)
+subdir = src/test-benchmarks
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__objects_1 =  \
+	activemq_test_benchmarks-PrimitiveMapBenchmark.$(OBJEXT) \
+	activemq_test_benchmarks-PerformanceTimer.$(OBJEXT) \
+	activemq_test_benchmarks-testRegistry.$(OBJEXT) \
+	activemq_test_benchmarks-main.$(OBJEXT)
+am_activemq_test_benchmarks_OBJECTS = $(am__objects_1)
+activemq_test_benchmarks_OBJECTS =  \
+	$(am_activemq_test_benchmarks_OBJECTS)
+activemq_test_benchmarks_DEPENDENCIES = ../main/libactivemq-cpp.la
+activemq_test_benchmarks_LINK = $(LIBTOOL) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(activemq_test_benchmarks_SOURCES)
+DIST_SOURCES = $(activemq_test_benchmarks_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACTIVEMQ_API_VERSION = @ACTIVEMQ_API_VERSION@
+ACTIVEMQ_LIBRARY_NAME = @ACTIVEMQ_LIBRARY_NAME@
+ACTIVEMQ_LIBRARY_VERSION = @ACTIVEMQ_LIBRARY_VERSION@
+ACTIVEMQ_RELEASE = @ACTIVEMQ_RELEASE@
+ACTIVEMQ_VERSION = @ACTIVEMQ_VERSION@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
+CPPUNIT_CONFIG = @CPPUNIT_CONFIG@
+CPPUNIT_LIBS = @CPPUNIT_LIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+cc_sources = \
+  activemq/util/PrimitiveMapBenchmark.cpp \
+  benchmark/PerformanceTimer.cpp \
+  testRegistry.cpp \
+  main.cpp
+
+hh_sources = \
+  activemq/util/PerformanceTimer.h \
+  benchmark/BenchmarkBase.h \
+  benchmark/PerformanceTimer.h
+
+activemq_test_benchmarks_SOURCES = $(cc_sources)
+activemq_test_benchmarks_CXXFLAGS = -Wno-non-virtual-dtor -Wno-unused-parameter -Wno-uninitialized
-I$(srcdir)/../main @CPPUNIT_CFLAGS@
+activemq_test_benchmarks_LDADD = ../main/libactivemq-cpp.la @CPPUNIT_LIBS@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/test-benchmarks/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/test-benchmarks/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)';
\
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);;
\
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-checkPROGRAMS:
+	@list='$(check_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+activemq-test-benchmarks$(EXEEXT): $(activemq_test_benchmarks_OBJECTS) $(activemq_test_benchmarks_DEPENDENCIES)

+	@rm -f activemq-test-benchmarks$(EXEEXT)
+	$(activemq_test_benchmarks_LINK) $(activemq_test_benchmarks_OBJECTS) $(activemq_test_benchmarks_LDADD)
$(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activemq_test_benchmarks-PerformanceTimer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activemq_test_benchmarks-PrimitiveMapBenchmark.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activemq_test_benchmarks-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activemq_test_benchmarks-testRegistry.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W)
'$<'`
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+activemq_test_benchmarks-PrimitiveMapBenchmark.o: activemq/util/PrimitiveMapBenchmark.cpp
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -MT activemq_test_benchmarks-PrimitiveMapBenchmark.o
-MD -MP -MF $(DEPDIR)/activemq_test_benchmarks-PrimitiveMapBenchmark.Tpo -c -o activemq_test_benchmarks-PrimitiveMapBenchmark.o
`test -f 'activemq/util/PrimitiveMapBenchmark.cpp' || echo '$(srcdir)/'`activemq/util/PrimitiveMapBenchmark.cpp
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/activemq_test_benchmarks-PrimitiveMapBenchmark.Tpo
$(DEPDIR)/activemq_test_benchmarks-PrimitiveMapBenchmark.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='activemq/util/PrimitiveMapBenchmark.cpp' object='activemq_test_benchmarks-PrimitiveMapBenchmark.o'
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -c -o activemq_test_benchmarks-PrimitiveMapBenchmark.o
`test -f 'activemq/util/PrimitiveMapBenchmark.cpp' || echo '$(srcdir)/'`activemq/util/PrimitiveMapBenchmark.cpp
+
+activemq_test_benchmarks-PrimitiveMapBenchmark.obj: activemq/util/PrimitiveMapBenchmark.cpp
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -MT activemq_test_benchmarks-PrimitiveMapBenchmark.obj
-MD -MP -MF $(DEPDIR)/activemq_test_benchmarks-PrimitiveMapBenchmark.Tpo -c -o activemq_test_benchmarks-PrimitiveMapBenchmark.obj
`if test -f 'activemq/util/PrimitiveMapBenchmark.cpp'; then $(CYGPATH_W) 'activemq/util/PrimitiveMapBenchmark.cpp';
else $(CYGPATH_W) '$(srcdir)/activemq/util/PrimitiveMapBenchmark.cpp'; fi`
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/activemq_test_benchmarks-PrimitiveMapBenchmark.Tpo
$(DEPDIR)/activemq_test_benchmarks-PrimitiveMapBenchmark.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='activemq/util/PrimitiveMapBenchmark.cpp' object='activemq_test_benchmarks-PrimitiveMapBenchmark.obj'
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -c -o activemq_test_benchmarks-PrimitiveMapBenchmark.obj
`if test -f 'activemq/util/PrimitiveMapBenchmark.cpp'; then $(CYGPATH_W) 'activemq/util/PrimitiveMapBenchmark.cpp';
else $(CYGPATH_W) '$(srcdir)/activemq/util/PrimitiveMapBenchmark.cpp'; fi`
+
+activemq_test_benchmarks-PerformanceTimer.o: benchmark/PerformanceTimer.cpp
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -MT activemq_test_benchmarks-PerformanceTimer.o
-MD -MP -MF $(DEPDIR)/activemq_test_benchmarks-PerformanceTimer.Tpo -c -o activemq_test_benchmarks-PerformanceTimer.o
`test -f 'benchmark/PerformanceTimer.cpp' || echo '$(srcdir)/'`benchmark/PerformanceTimer.cpp
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/activemq_test_benchmarks-PerformanceTimer.Tpo $(DEPDIR)/activemq_test_benchmarks-PerformanceTimer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='benchmark/PerformanceTimer.cpp' object='activemq_test_benchmarks-PerformanceTimer.o'
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -c -o activemq_test_benchmarks-PerformanceTimer.o
`test -f 'benchmark/PerformanceTimer.cpp' || echo '$(srcdir)/'`benchmark/PerformanceTimer.cpp
+
+activemq_test_benchmarks-PerformanceTimer.obj: benchmark/PerformanceTimer.cpp
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -MT activemq_test_benchmarks-PerformanceTimer.obj
-MD -MP -MF $(DEPDIR)/activemq_test_benchmarks-PerformanceTimer.Tpo -c -o activemq_test_benchmarks-PerformanceTimer.obj
`if test -f 'benchmark/PerformanceTimer.cpp'; then $(CYGPATH_W) 'benchmark/PerformanceTimer.cpp';
else $(CYGPATH_W) '$(srcdir)/benchmark/PerformanceTimer.cpp'; fi`
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/activemq_test_benchmarks-PerformanceTimer.Tpo $(DEPDIR)/activemq_test_benchmarks-PerformanceTimer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='benchmark/PerformanceTimer.cpp' object='activemq_test_benchmarks-PerformanceTimer.obj'
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -c -o activemq_test_benchmarks-PerformanceTimer.obj
`if test -f 'benchmark/PerformanceTimer.cpp'; then $(CYGPATH_W) 'benchmark/PerformanceTimer.cpp';
else $(CYGPATH_W) '$(srcdir)/benchmark/PerformanceTimer.cpp'; fi`
+
+activemq_test_benchmarks-testRegistry.o: testRegistry.cpp
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -MT activemq_test_benchmarks-testRegistry.o
-MD -MP -MF $(DEPDIR)/activemq_test_benchmarks-testRegistry.Tpo -c -o activemq_test_benchmarks-testRegistry.o
`test -f 'testRegistry.cpp' || echo '$(srcdir)/'`testRegistry.cpp
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/activemq_test_benchmarks-testRegistry.Tpo $(DEPDIR)/activemq_test_benchmarks-testRegistry.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='testRegistry.cpp' object='activemq_test_benchmarks-testRegistry.o'
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -c -o activemq_test_benchmarks-testRegistry.o
`test -f 'testRegistry.cpp' || echo '$(srcdir)/'`testRegistry.cpp
+
+activemq_test_benchmarks-testRegistry.obj: testRegistry.cpp
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -MT activemq_test_benchmarks-testRegistry.obj
-MD -MP -MF $(DEPDIR)/activemq_test_benchmarks-testRegistry.Tpo -c -o activemq_test_benchmarks-testRegistry.obj
`if test -f 'testRegistry.cpp'; then $(CYGPATH_W) 'testRegistry.cpp'; else $(CYGPATH_W) '$(srcdir)/testRegistry.cpp';
fi`
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/activemq_test_benchmarks-testRegistry.Tpo $(DEPDIR)/activemq_test_benchmarks-testRegistry.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='testRegistry.cpp' object='activemq_test_benchmarks-testRegistry.obj'
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -c -o activemq_test_benchmarks-testRegistry.obj
`if test -f 'testRegistry.cpp'; then $(CYGPATH_W) 'testRegistry.cpp'; else $(CYGPATH_W) '$(srcdir)/testRegistry.cpp';
fi`
+
+activemq_test_benchmarks-main.o: main.cpp
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -MT activemq_test_benchmarks-main.o -MD -MP
-MF $(DEPDIR)/activemq_test_benchmarks-main.Tpo -c -o activemq_test_benchmarks-main.o `test
-f 'main.cpp' || echo '$(srcdir)/'`main.cpp
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/activemq_test_benchmarks-main.Tpo $(DEPDIR)/activemq_test_benchmarks-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cpp' object='activemq_test_benchmarks-main.o'
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -c -o activemq_test_benchmarks-main.o `test
-f 'main.cpp' || echo '$(srcdir)/'`main.cpp
+
+activemq_test_benchmarks-main.obj: main.cpp
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -MT activemq_test_benchmarks-main.obj -MD
-MP -MF $(DEPDIR)/activemq_test_benchmarks-main.Tpo -c -o activemq_test_benchmarks-main.obj
`if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp';
fi`
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/activemq_test_benchmarks-main.Tpo $(DEPDIR)/activemq_test_benchmarks-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cpp' object='activemq_test_benchmarks-main.obj'
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(activemq_test_benchmarks_CXXFLAGS) $(CXXFLAGS) -c -o activemq_test_benchmarks-main.obj `if
test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp';
fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean \
+	clean-checkPROGRAMS clean-generic clean-libtool ctags \
+	distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.cpp?view=auto&rev=553849
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.cpp
(added)
+++ activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.cpp
Fri Jul  6 04:50:18 2007
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "PrimitiveMapBenchmark.h"
+
+#include <string>
+#include <activemq/concurrent/Thread.h>
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+
+////////////////////////////////////////////////////////////////////////////////
+PrimitiveMapBenchmark::PrimitiveMapBenchmark() {}
+
+////////////////////////////////////////////////////////////////////////////////
+PrimitiveMapBenchmark::~PrimitiveMapBenchmark() {}
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveMapBenchmark::setUp(){
+    for( int i = 0; i < 1024; ++i ) {
+        testString += "a";
+        byteBuffer.push_back( 'a' );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveMapBenchmark::run() {
+
+    int numRuns = 500;
+
+    for( int i = 0; i < numRuns; ++i ){
+        map.setBool( "BOOL", true );
+        map.setByte( "BYTE", 12 );
+        map.setChar( "CHAR", 60 );
+        map.setInt( "INT", 54275482 );
+        map.setShort( "SHORT", 32767 );
+        map.setLong( "LONG", 0xFFLL );
+        map.setDouble( "DOUBLE", 1321.1516 );
+        map.setFloat( "FLOAT", 45.45f );
+        map.setString( "STRING", testString );
+        map.setByteArray( "BYTES", byteBuffer );
+    }
+
+    for( int i = 0; i < numRuns; ++i ){
+        map.getBool( "BOOL" );
+        map.getByte( "BYTE" );
+        map.getChar( "CHAR" );
+        map.getInt( "INT" );
+        map.getShort( "SHORT" );
+        map.getLong( "LONG" );
+        map.getDouble( "DOUBLE" );
+        map.getFloat( "FLOAT" );
+        map.getString( "STRING" );
+        map.getByteArray( "BYTES" );
+    }
+
+    for( int i = 0; i < numRuns; ++i ){
+        map.getKeys();
+        map.getValues();
+    }
+
+    for( int i = 0; i < numRuns; ++i ){
+        PrimitiveMap theCopy;
+        theCopy.copy( map );
+    }
+}

Added: activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.h?view=auto&rev=553849
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.h
(added)
+++ activemq/activemq-cpp/trunk/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.h
Fri Jul  6 04:50:18 2007
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_UTIL_PRIMITIVEMAPBENCHMARK_H_
+#define _ACTIVEMQ_UTIL_PRIMITIVEMAPBENCHMARK_H_
+
+#include <benchmark/BenchmarkBase.h>
+
+#include <activemq/util/PrimitiveMap.h>
+
+namespace activemq{
+namespace util{
+
+    class PrimitiveMapBenchmark :
+        public benchmark::BenchmarkBase<
+            activemq::util::PrimitiveMapBenchmark, PrimitiveMap >
+    {
+    private:
+
+        PrimitiveMap map;
+        std::string testString;
+        std::vector<unsigned char> byteBuffer;
+
+    public:
+
+        PrimitiveMapBenchmark();
+        virtual ~PrimitiveMapBenchmark();
+
+        void setUp();
+        void run();
+
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_UTIL_PRIMITIVEMAPBENCHMARK_H_*/

Added: activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/BenchmarkBase.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/BenchmarkBase.h?view=auto&rev=553849
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/BenchmarkBase.h (added)
+++ activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/BenchmarkBase.h Fri Jul  6 04:50:18
2007
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _BENCHMARK_BENCHMARKBASE_H_
+#define _BENCHMARK_BENCHMARKBASE_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <activemq/concurrent/Runnable.h>
+#include <benchmark/PerformanceTimer.h>
+#include <string>
+
+namespace benchmark{
+
+    template < class NAME, class TARGET, int ITERATIONS = 100 >
+    class BenchmarkBase : public activemq::concurrent::Runnable,
+                          public CppUnit::TestFixture
+    {
+        CPPUNIT_TEST_SUITE( NAME );
+        CPPUNIT_TEST( runBenchmark );
+        CPPUNIT_TEST_SUITE_END();
+
+    private:
+
+        PerformanceTimer timer;
+
+    public:
+
+        virtual ~BenchmarkBase() {}
+
+        int getIterations() const {
+            return ITERATIONS;
+        }
+
+        void runBenchmark(){
+
+            for( int i = 0; i < ITERATIONS; ++i ){
+                timer.start();
+                this->run();
+                timer.stop();
+            }
+
+            std::cout << typeid( TARGET ).name() << " Benchmark Time = "
+                      << timer.getAverageTime() << " Millisecs"
+                      << std::endl;
+        }
+
+    };
+
+}
+
+#endif /*_BENCHMARK_BENCHMARKBASE_H_*/

Added: activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/PerformanceTimer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/PerformanceTimer.cpp?view=auto&rev=553849
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/PerformanceTimer.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/PerformanceTimer.cpp Fri Jul
 6 04:50:18 2007
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "PerformanceTimer.h"
+
+#include <activemq/util/Date.h>
+
+using namespace std;
+using namespace benchmark;
+using namespace activemq::util;
+
+////////////////////////////////////////////////////////////////////////////////
+PerformanceTimer::PerformanceTimer(){
+    this->numberOfRuns = 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+PerformanceTimer::~PerformanceTimer(){
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PerformanceTimer::start(){
+    this->startTime = Date::getCurrentTimeMilliseconds();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PerformanceTimer::stop(){
+
+    this->endTime = Date::getCurrentTimeMilliseconds();
+    times.push_back( endTime - startTime );
+    numberOfRuns++;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PerformanceTimer::reset(){
+    this->startTime = 0;
+    this->endTime = 0;
+    this->times.clear();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+long long PerformanceTimer::getAverageTime() const{
+
+    std::vector<long long>::const_iterator iter = times.begin();
+    long long totalTime = 0;
+
+    do{
+        totalTime += *iter;
+    } while( ++iter != times.end() );
+
+    if( totalTime == 0 || numberOfRuns == 0 ) {
+        return 0;
+    }
+
+    return totalTime / numberOfRuns;
+}

Added: activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/PerformanceTimer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/PerformanceTimer.h?view=auto&rev=553849
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/PerformanceTimer.h (added)
+++ activemq/activemq-cpp/trunk/src/test-benchmarks/benchmark/PerformanceTimer.h Fri Jul 
6 04:50:18 2007
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _BENCHMARK_PERFORMANCETIMER_H_
+#define _BENCHMARK_PERFORMANCETIMER_H_
+
+#include <activemq/util/Config.h>
+#include <vector>
+
+namespace benchmark{
+
+    /**
+     * This class is used to aid in testing the performace of code.  This class
+     * maintains a running list of performance numbers for successive calls to
+     * the method start and stop.  Once the desired number of tests has been run,
+     * the user can call getAverageTime to find out the average time it took for
+     * all start / stop cycles.
+     */
+    class PerformanceTimer {
+    private:
+
+        long long numberOfRuns;
+        std::vector<long long> times;
+        long long startTime;
+        long long endTime;
+
+    public:
+
+        PerformanceTimer();
+        virtual ~PerformanceTimer();
+
+        /**
+         * Starts the timer, time is from the call to start until a call
+         * to stop is made.
+         */
+        void start();
+
+        /**
+         * Stops the timer and records the latest time.
+         */
+        void stop();
+
+        /**
+         * Resets the Timer to an unused state all data is thrown out.
+         */
+        void reset();
+
+        /**
+         * Gets the number of runs made so far
+         * @returns unsigned int that counts the number of runs
+         */
+        unsigned int getNumberOfRuns() const {
+            return numberOfRuns;
+        }
+
+        /**
+         * Gets the overall average time that the count has recoreded
+         * for all start / stop cycles.
+         * @returns the average time for all the runs times / numberOfRuns
+         */
+        long long getAverageTime() const;
+
+    };
+
+}
+
+#endif /*_PERFORMANCETIMER_H_*/

Added: activemq/activemq-cpp/trunk/src/test-benchmarks/main.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-benchmarks/main.cpp?view=auto&rev=553849
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-benchmarks/main.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test-benchmarks/main.cpp Fri Jul  6 04:50:18 2007
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/TestResult.h>
+#include <activemq/util/Config.h>
+#include <iostream>
+
+int main( int argc AMQCPP_UNUSED, char **argv AMQCPP_UNUSED ) {
+    try {
+        CppUnit::TextUi::TestRunner runner;
+        CppUnit::TestFactoryRegistry &registry =
+            CppUnit::TestFactoryRegistry::getRegistry();
+        runner.addTest( registry.makeTest() );
+
+        std::cout << "=====================================================\n";
+        std::cout << "Starting the Benchmarks:" << std::endl;
+        std::cout << "-----------------------------------------------------\n";
+
+        bool wasSuccessful = runner.run( "", false );
+
+        std::cout << "-----------------------------------------------------\n";
+        std::cout << "Finished with the Benchmarks." << std::endl;
+        std::cout << "=====================================================\n";
+
+        return !wasSuccessful;
+    } catch(...) {
+        std::cout << "----------------------------------------" << std::endl;
+        std::cout << "- AN ERROR HAS OCCURED:                -" << std::endl;
+        std::cout << "----------------------------------------" << std::endl;
+    }
+}

Added: activemq/activemq-cpp/trunk/src/test-benchmarks/testRegistry.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-benchmarks/testRegistry.cpp?view=auto&rev=553849
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-benchmarks/testRegistry.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test-benchmarks/testRegistry.cpp Fri Jul  6 04:50:18 2007
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/util/PrimitiveMapBenchmark.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveMapBenchmark );



Mime
View raw message