summaryrefslogtreecommitdiff
path: root/performance-tests
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-12-30 20:21:10 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-12-30 20:21:10 +0000
commit2dbc68b3cbc76816df4d738b18d1631cd334aea8 (patch)
treedf5c5a499fd6df2afed06560fb4ef1941e02b716 /performance-tests
parent787f8122255799dec288f230e9590e36f603298a (diff)
downloadATCD-2dbc68b3cbc76816df4d738b18d1631cd334aea8.tar.gz
*** empty log message ***
Diffstat (limited to 'performance-tests')
-rw-r--r--performance-tests/Synch-Benchmarks/Perf_Test/README32
-rw-r--r--performance-tests/Synch-Benchmarks/README63
-rw-r--r--performance-tests/Synch-Benchmarks/Synch_Lib/Benchmark_Base.cpp (renamed from performance-tests/Synch-Benchmarks/Benchmark_Base.cpp)2
-rw-r--r--performance-tests/Synch-Benchmarks/Synch_Lib/Benchmark_Base.h (renamed from performance-tests/Synch-Benchmarks/Benchmark_Base.h)7
-rw-r--r--performance-tests/Synch-Benchmarks/Synch_Lib/README4
-rw-r--r--performance-tests/Synch-Benchmarks/Synch_Lib/export_mac.h36
6 files changed, 117 insertions, 27 deletions
diff --git a/performance-tests/Synch-Benchmarks/Perf_Test/README b/performance-tests/Synch-Benchmarks/Perf_Test/README
new file mode 100644
index 00000000000..af425adcffe
--- /dev/null
+++ b/performance-tests/Synch-Benchmarks/Perf_Test/README
@@ -0,0 +1,32 @@
+The files in this directory support controlled benchmarking of the ACE
+synchronization mechanisms.
+
+ These mechanisms include:
+
+ . Mutexes
+ . Reader/writer locks
+ . Condition variables
+ . Semaphores
+ . Tokens
+ . Adaptive lockings
+
+There are additional tests that measure the memory bandwidth under the
+following conditions:
+
+ . User memory-to-memory copying of data within a single thread
+ . User memory-to-kernel-to-user memory copying via pipes
+ between separate processes, as well as between separate
+ threads in the same process
+
+There are many options available for this module that can be put into
+svc.conf files. See the Performance_Test_Options.[Chi] file for more
+details. Some reasonable options to use to run the tests are:
+
+ -v -B -s 15
+ -v -n 4 -t 4 -s 15
+
+You should experiment with other options as you see fit. Note that on
+Solaris, you should always make sure that you have more than 1 LWP (by
+using either the -B or the -n options) since otherwise the program may
+get into an infinite loop due to the semantics of SunOS unbound
+threads... (This may no longer be the case.)
diff --git a/performance-tests/Synch-Benchmarks/README b/performance-tests/Synch-Benchmarks/README
index 417757de524..c902ecab244 100644
--- a/performance-tests/Synch-Benchmarks/README
+++ b/performance-tests/Synch-Benchmarks/README
@@ -1,29 +1,46 @@
-The files in this directory support controlled benchmarking of the ACE
-C++ wrappers for Solaris 2.x synchronization mechanisms. These
-mechanisms include:
+This directory contains a program for benchmarking various
+synchronization and concurrent programming mechanisms in ACE.
- . Mutexes
- . Reader/writer locks
- . Condition variables
- . Semaphores (both Solaris and traditional System V)
+To build the program, do a make on the top level Makefile (or,
+on NT, open Synch_Tests.dsw and build evey project in it.)
+There are several modules which perform different benchmarking
+measurements in subdirectories. Here is a short description of all
+the subdirectories:
-There are additional tests that measure the memory bandwidth under the
-following conditions:
+ Synch_lib: This directory contains interface definitions required
+ by both main program (synch_driver) and other modules.
+ Base_Test: This directory contains a set of baseline tests. They
+ measure the time to obtain a lock without contension,
+ or trying to objtain a lock with contension.
+ Perf_Test: This directory contains a set of performance tests.
+ They measure the opeation performed by spawning a
+ bunch of threads and let these threads compete with
+ each other in obtaining a lock.
- . User memory-to-memory copying of data within a single thread
- . User memory-to-kernel-to-user memory copying via pipes
- between separate processes, as well as between separate
- threads in the same process
+There'll always be a "Method" object in each module subdirectory.
+They defines the method used in benchmarking and usually takes some
+options which can be defined in the 'svc.conf' file. Beside from this
+"Method" object, there are also a lot of "Test" objects that define
+the mechanism to be tested.
-There are many options available for this program. See the
-Options.[Chi] file for more details. Some reasonable options to use
-to run the tests are:
+Executing the program: the synch_driver performs various benchmarking
+according to the "script" defined in 'svc.conf' file. All command
+line options applicable to ACE's Service_Config class can be used.
-% ./synch_driver -v -B -s 15
-% ./synch_driver -v -n 4 -t 4 -s 15
+The entries in svc.conf file are always in groups. Each group
+consists of several svc.conf entries. The first entry in each group
+is the "Method" entry which defines the methodology used in the test.
+The rest of the entries are "Test" entries which define the mechanism
+to be test using the "Method".
-You should experiment with other options as you see fit. Note that in
-general you should always make sure that you have more than 1 LWP (by
-using either the -B or the -n options) since otherwise the program may
-to into an infinite loop due to the semantics of SunOS unbound
-threads...
+At this moment, you can not have entries with the same object (either
+"Method" object or "Test" object) in one svc.conf file. Therefore, at
+this moment, there can only be two groups in the svc.conf. Of them,
+each "Test" can only be performed once. Therefore, there's no way to
+benchmark using the same method with differnt configurations within
+the same svc.conf file. However, this can be easily overcome by
+defining multiple svc.conf files and invoking the synch_driver with
+different svc.conf file.
+
+There'll be more detailed description about how a "Method" object can
+be configured in respective subdirectory. \ No newline at end of file
diff --git a/performance-tests/Synch-Benchmarks/Benchmark_Base.cpp b/performance-tests/Synch-Benchmarks/Synch_Lib/Benchmark_Base.cpp
index 0f74d7485ba..04c3fbc52d2 100644
--- a/performance-tests/Synch-Benchmarks/Benchmark_Base.cpp
+++ b/performance-tests/Synch-Benchmarks/Synch_Lib/Benchmark_Base.cpp
@@ -1,6 +1,6 @@
// $Id$
-#define ACE_BUILD_SVC_DLL
+#define SYNCHLIB_BUILD_DLL
#include "Benchmark_Base.h"
ACE_RCSID(Synch_Benchmarks, Benchmark_Base, "$Id$")
diff --git a/performance-tests/Synch-Benchmarks/Benchmark_Base.h b/performance-tests/Synch-Benchmarks/Synch_Lib/Benchmark_Base.h
index ed3e46099a6..7a43436f0f9 100644
--- a/performance-tests/Synch-Benchmarks/Benchmark_Base.h
+++ b/performance-tests/Synch-Benchmarks/Synch_Lib/Benchmark_Base.h
@@ -15,6 +15,7 @@
# include "ace/Service_Repository.h"
# include "ace/Synch.h"
# include "ace/Service_Types.h"
+# include "export_mac.h"
# if defined (ACE_HAS_THREADS)
@@ -43,7 +44,7 @@ private:
};
# endif /* ACE_HAS_PTHREADS || ACE_HAS_DCETHREADS || VXWORKS */
-class ACE_Svc_Export Benchmark_Base : public ACE_Service_Object
+class SYNCHLIB_Export Benchmark_Base : public ACE_Service_Object
{
// = TITLE
// Base class for all benchmarking objects.
@@ -80,7 +81,7 @@ protected:
# endif /* ACE_HAS_PTHREADS || ACE_HAS_DCETHREADS || VXWORKS */
};
-class ACE_Svc_Export Benchmark_Method_Base : public Benchmark_Base
+class SYNCHLIB_Export Benchmark_Method_Base : public Benchmark_Base
{
// = TITLE
// This class identifies itself as Benmarking Method class.
@@ -108,7 +109,7 @@ protected:
Benchmark_Method_Base (void);
};
-class ACE_Svc_Export Benchmark_Performance_Test_Base : public Benchmark_Base
+class SYNCHLIB_Export Benchmark_Performance_Test_Base : public Benchmark_Base
{
// = TITLE
// This class identifies itself as Benmarking Performance Test class.
diff --git a/performance-tests/Synch-Benchmarks/Synch_Lib/README b/performance-tests/Synch-Benchmarks/Synch_Lib/README
new file mode 100644
index 00000000000..f17fe39234a
--- /dev/null
+++ b/performance-tests/Synch-Benchmarks/Synch_Lib/README
@@ -0,0 +1,4 @@
+This subdirectory contains a library that defines the interface used
+by all benchmarking modules. The library is required by all modules
+and the synch_driver. If you want to develop your own benchmarking
+module, this directory provides a starting point.
diff --git a/performance-tests/Synch-Benchmarks/Synch_Lib/export_mac.h b/performance-tests/Synch-Benchmarks/Synch_Lib/export_mac.h
new file mode 100644
index 00000000000..9ccc20f399d
--- /dev/null
+++ b/performance-tests/Synch-Benchmarks/Synch_Lib/export_mac.h
@@ -0,0 +1,36 @@
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by
+// ${ACE_ROOT}/GenExportH.BAT
+// ------------------------------
+#if !defined (SYNCHLIB_EXPORT_H)
+#define SYNCHLIB_EXPORT_H
+
+#include "ace/OS.h"
+
+#if !defined (SYNCHLIB_HAS_DLL)
+#define SYNCHLIB_HAS_DLL 1
+#endif /* !SYNCHLIB_HAS_DLL */
+
+#if defined (SYNCHLIB_HAS_DLL)
+# if (SYNCHLIB_HAS_DLL == 1)
+# if defined (SYNCHLIB_BUILD_DLL)
+# define SYNCHLIB_Export ACE_Proper_Export_Flag
+# define SYNCHLIB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# else
+# define SYNCHLIB_Export ACE_Proper_Import_Flag
+# define SYNCHLIB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# endif /* SYNCHLIB_BUILD_DLL */
+# else
+# define SYNCHLIB_Export
+# define SYNCHLIB_SINGLETON_DECLARATION(T)
+# endif /* ! SYNCHLIB_HAS_DLL == 1 */
+#else
+# define SYNCHLIB_Export
+# define SYNCHLIB_SINGLETON_DECLARATION(T)
+#endif /* SYNCHLIB_HAS_DLL */
+
+#endif /* SYNCHLIB_EXPORT_H */
+
+// End of auto generated file.