summaryrefslogtreecommitdiff
path: root/ACE/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
commitc44379cc7d9c7aa113989237ab0f56db12aa5219 (patch)
tree66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp
parent3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff)
downloadATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz
Repo restructuring
Diffstat (limited to 'ACE/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp')
-rw-r--r--ACE/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp62
1 files changed, 62 insertions, 0 deletions
diff --git a/ACE/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp b/ACE/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp
new file mode 100644
index 00000000000..6d3622c27b8
--- /dev/null
+++ b/ACE/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp
@@ -0,0 +1,62 @@
+// $Id$
+
+#define ACE_BUILD_SVC_DLL
+
+#include "Baseline_Test.h"
+
+# if defined (ACE_HAS_THREADS)
+
+#include "ace/Log_Msg.h"
+
+class ACE_Svc_Export Baseline_Base_Test : public Baseline_Test_Base
+{
+public:
+ virtual int acquire ();
+ virtual int release ();
+ // These two method are used to test try_acquire performance.
+
+ virtual int test_acquire_release ();
+ virtual int test_try_lock ();
+ // Real test methods.
+};
+
+int
+Baseline_Base_Test::acquire ()
+{
+ return 0;
+}
+
+int
+Baseline_Base_Test::release ()
+{
+ return 0;
+}
+
+int
+Baseline_Base_Test::test_acquire_release ()
+{
+ baseline_options.start_inc_timer ();
+
+ for (; baseline_options.inc_loop_counter () ; )
+ ;
+
+ baseline_options.stop_inc_timer ();
+ return 0;
+}
+
+int
+Baseline_Base_Test::test_try_lock ()
+{
+ baseline_options.start_inc_timer ();
+
+ for (; baseline_options.inc_loop_counter () ; )
+ ;
+
+ baseline_options.stop_inc_timer ();
+ return 0;
+}
+
+ACE_SVC_FACTORY_DECLARE (Baseline_Base_Test)
+ACE_SVC_FACTORY_DEFINE (Baseline_Base_Test)
+
+#endif /* ACE_HAS_THREADS */