summaryrefslogtreecommitdiff
path: root/performance-tests/Server_Concurrency
diff options
context:
space:
mode:
Diffstat (limited to 'performance-tests/Server_Concurrency')
-rw-r--r--performance-tests/Server_Concurrency/Latency_Stats.h208
-rw-r--r--performance-tests/Server_Concurrency/Leader_Follower/Leader_Follower.dsp102
-rw-r--r--performance-tests/Server_Concurrency/Leader_Follower/Leader_Follower.dsw28
-rw-r--r--performance-tests/Server_Concurrency/Leader_Follower/Makefile33
-rw-r--r--performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp327
-rw-r--r--performance-tests/Server_Concurrency/Makefile20
-rw-r--r--performance-tests/Server_Concurrency/Queue_Based_Workers/Makefile164
-rw-r--r--performance-tests/Server_Concurrency/Queue_Based_Workers/Queue_Based_Workers.dsp102
-rw-r--r--performance-tests/Server_Concurrency/Queue_Based_Workers/Queue_Based_Workers.dsw29
-rw-r--r--performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp418
-rw-r--r--performance-tests/Server_Concurrency/Server_Concurrency.dsw41
-rwxr-xr-xperformance-tests/Server_Concurrency/run_test.sh13
12 files changed, 0 insertions, 1485 deletions
diff --git a/performance-tests/Server_Concurrency/Latency_Stats.h b/performance-tests/Server_Concurrency/Latency_Stats.h
deleted file mode 100644
index 951a8ae110d..00000000000
--- a/performance-tests/Server_Concurrency/Latency_Stats.h
+++ /dev/null
@@ -1,208 +0,0 @@
-// $Id$
-
-class Latency_Stats
-{
-public:
- Latency_Stats (void);
-
- void dump_results (const char* test_name,
- const char* sub_test);
-
- void sample (ACE_hrtime_t sample);
-
- void accumulate (const Latency_Stats& stats);
- // Useful to merge several Latency_Stats.
-
-private:
- u_long n_;
- ACE_hrtime_t sum_;
- ACE_hrtime_t sum2_;
- ACE_hrtime_t min_;
- ACE_hrtime_t max_;
-};
-
-inline
-Latency_Stats::Latency_Stats (void)
- : n_ (0),
- sum_ (0),
- sum2_ (0),
- min_ (0),
- max_ (0)
-{
-}
-
-inline void
-Latency_Stats::sample (ACE_hrtime_t sample)
-{
- this->sum_ += sample;
- this->sum2_ += sample * sample;
- if (this->n_ == 0)
- {
- this->min_ = sample;
- this->max_ = sample;
- }
- if (this->min_ > sample)
- this->min_ = sample;
- if (this->max_ < sample)
- this->max_ = sample;
- this->n_++;
-}
-
-inline void
-Latency_Stats::dump_results (const char *test_name,
- const char *sub_test)
-{
- if (this->n_ < 1)
- return;
-
- ACE_hrtime_t avg = this->sum_ / this->n_;
- ACE_hrtime_t dev =
- this->sum2_ / this->n_ - avg*avg;
-
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
-
- double min_usec = ACE_CU64_TO_CU32 (this->min_) / gsf;
- double max_usec = ACE_CU64_TO_CU32 (this->max_) / gsf;
- double avg_usec = ACE_CU64_TO_CU32 (avg) / gsf;
- double dev_usec = ACE_CU64_TO_CU32 (dev) / (gsf * gsf);
- ACE_DEBUG ((LM_DEBUG,
- "%s/%s: %.2f/%.2f/%.2f/%.2f (min/avg/max/var^2) [usecs]\n",
- test_name, sub_test,
- min_usec, avg_usec, max_usec, dev_usec));
-}
-
-inline void
-Latency_Stats::accumulate (const Latency_Stats& rhs)
-{
- if (rhs.n_ == 0)
- return;
-
- if (this->n_ == 0)
- {
- this->n_ = rhs.n_;
- this->min_ = rhs.min_;
- this->max_ = rhs.max_;
- this->sum_ = rhs.sum_;
- this->sum2_ = rhs.sum2_;
- return;
- }
-
- if (this->min_ > rhs.min_)
- this->min_ = rhs.min_;
- if (this->max_ < rhs.max_)
- this->max_ = rhs.max_;
-
- this->sum_ += rhs.sum_;
- this->sum2_ += rhs.sum2_;
- this->n_ += rhs.n_;
-}
-
-class Throughput_Stats
-{
-public:
- Throughput_Stats (void);
-
- void dump_results (const char* test_name,
- const char* sub_test);
-
- void sample (void);
- // An event has been received
-
- void accumulate (const Throughput_Stats& stats);
- // Useful to merge several Throughput_Stats.
-
-private:
- u_long n_;
- ACE_hrtime_t start_;
- ACE_hrtime_t stop_;
-};
-
-inline void
-Throughput_Stats::accumulate (const Throughput_Stats& rhs)
-{
- if (rhs.n_ == 0)
- return;
-
- if (this->n_ == 0)
- {
- this->start_ = rhs.start_;
- this->stop_ = rhs.stop_;
- this->n_ = rhs.n_;
- return;
- }
-
- if (this->start_ > rhs.start_)
- this->start_ = rhs.start_;
-
- if (this->stop_ < rhs.stop_)
- this->stop_ = rhs.stop_;
-
- this->n_ += rhs.n_;
-}
-
-inline void
-Throughput_Stats::dump_results (const char *test_name,
- const char *subtest)
-{
- if (this->n_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s/%s: no events recorded\n",
- test_name, subtest));
- return;
- }
-
- ACE_Time_Value tv;
- ACE_High_Res_Timer::hrtime_to_tv (tv, this->stop_ - this->start_);
-
- double f = 1.0/(tv.sec () + tv.usec () / 1000000.0);
- double events_per_second = this->n_ * f;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s/%s: "
- "%d / %d.%06.6d = %.3f events/second\n",
- test_name, subtest,
- this->n_,
- tv.sec (), tv.usec (),
- events_per_second));
-}
-
-inline
-Throughput_Stats::Throughput_Stats (void)
- : n_ (0)
-{
-}
-
-inline void
-Throughput_Stats::sample (void)
-{
- if (this->n_ == 0)
- {
- this->start_ = ACE_OS::gethrtime ();
- }
- this->n_++;
- this->stop_ = ACE_OS::gethrtime ();
-}
-
-inline void
-move_to_rt_class (void)
-{
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
-
- int result = ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS));
- if (result == 0)
- {
- result = ACE_OS::thr_setprio (priority);
- }
-
- if (result != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Cannot move program to realtime class.\n"));
- }
-}
diff --git a/performance-tests/Server_Concurrency/Leader_Follower/Leader_Follower.dsp b/performance-tests/Server_Concurrency/Leader_Follower/Leader_Follower.dsp
deleted file mode 100644
index b1bf8fdafae..00000000000
--- a/performance-tests/Server_Concurrency/Leader_Follower/Leader_Follower.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Leader_Follower" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Leader_Follower - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Leader_Follower.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Leader_Follower.mak" CFG="Leader_Follower - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Leader_Follower - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Leader_Follower - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Leader_Follower - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Leader_Follower - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Leader_Follower - Win32 Release"
-# Name "Leader_Follower - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\leader_follower.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/performance-tests/Server_Concurrency/Leader_Follower/Leader_Follower.dsw b/performance-tests/Server_Concurrency/Leader_Follower/Leader_Follower.dsw
deleted file mode 100644
index 7b90119e3f1..00000000000
--- a/performance-tests/Server_Concurrency/Leader_Follower/Leader_Follower.dsw
+++ /dev/null
@@ -1,28 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Leader_Follower"=".\Leader_Follower.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
diff --git a/performance-tests/Server_Concurrency/Leader_Follower/Makefile b/performance-tests/Server_Concurrency/Leader_Follower/Makefile
deleted file mode 100644
index 7c0586fafa5..00000000000
--- a/performance-tests/Server_Concurrency/Leader_Follower/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# $Id$
-#
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-BIN = leader_follower
-
-FILES = $(BIN)
-LSRC = $(addsuffix .cpp,$(FILES))
-LOBJ = $(addsuffix .o,$(FILES))
-CPPFLAGS += -I..
-
-BUILD = $(VOBJS) $(VBIN)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
diff --git a/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp b/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp
deleted file mode 100644
index 16b88f06e96..00000000000
--- a/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp
+++ /dev/null
@@ -1,327 +0,0 @@
-// $Id$
-
-#include "ace/Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Profile_Timer.h"
-#include "../Latency_Stats.h"
-
-static size_t number_of_messages = 100;
-static size_t message_size = 100;
-static size_t number_of_threads = 10;
-static size_t burst_size = 10;
-static size_t timeout_between_bursts = 1;
-
-static size_t leader_available = 0;
-static size_t messages_in_this_burst = 0;
-static size_t total_messages_consumed = 0;
-static size_t burst = 1;
-
-static ACE_hrtime_t start_of_burst;
-
-enum DEBUGGING_RANGE
-{
- NONE = 0,
- DEFAULT = 1,
- PRINT_INDIVIDUAL_LATENCY = 2
-};
-
-static DEBUGGING_RANGE debug = NONE;
-
-typedef ACE_Task<ACE_MT_SYNCH> TASK;
-
-class Leader_Follower_Task : public TASK
-{
-public:
- Leader_Follower_Task (ACE_SYNCH_MUTEX &mutex,
- ACE_SYNCH_CONDITION &condition);
- int svc (void);
-
- size_t messages_consumed_;
- ACE_SYNCH_MUTEX &mutex_;
- ACE_SYNCH_CONDITION &condition_;
-
- Latency_Stats latency_stats_;
- Throughput_Stats throughput_stats_;
-};
-
-Leader_Follower_Task::Leader_Follower_Task (ACE_SYNCH_MUTEX &mutex,
- ACE_SYNCH_CONDITION &condition)
- : messages_consumed_ (0),
- mutex_ (mutex),
- condition_ (condition)
-{
-}
-
-int
-Leader_Follower_Task::svc (void)
-{
- for (;;)
- {
- {
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, -1);
-
- // Wait until there is no leader.
- while (leader_available)
- {
- int result = this->condition_.wait ();
- if (result == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Leader_Follower_Task::svc (%t) -> %p\n",
- "wait error"),
- -1);
- }
- }
-
- // I am the leader.
- leader_available = 1;
-
- //
- // We are letting go of the leader follower lock before going
- // in the event loop.
- //
- }
-
- //
- // It is ok to modify these shared variables without a lock
- // since we are the only leader.
- //
-
- int exit_loop = 0;
- if (number_of_messages == 0)
- {
- exit_loop = 1;
- }
- else
- {
- if (messages_in_this_burst == burst_size)
- {
- ++burst;
- messages_in_this_burst = 0;
- ACE_Time_Value tv (0, timeout_between_bursts);
- ACE_OS::sleep (tv);
- }
-
- if (messages_in_this_burst == 0)
- {
- start_of_burst = ACE_OS::gethrtime ();
- }
-
- --number_of_messages;
-
- // Burst counter.
- ++messages_in_this_burst;
-
- // Global counter.
- ++total_messages_consumed;
-
- // Local counter.
- ++this->messages_consumed_;
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) burst %d: message %d; overall message %d; message for this thread %d\n",
- burst,
- messages_in_this_burst,
- total_messages_consumed,
- this->messages_consumed_));
- }
- }
-
- {
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, -1);
-
- // I am no longer the leader.
- leader_available = 0;
-
- // Wake up a follower.
- this->condition_.signal ();
- }
-
- if (exit_loop)
- {
- break;
- }
- else
- {
- //
- // Process message here.
- //
-
- for (size_t j = 0; j < message_size; ++j)
- {
- // Eat a little CPU
- /* takes about 40.2 usecs on a 167 MHz Ultra2 */
- u_long n = 11UL;
- ACE::is_prime (n, 2, n / 2);
- }
-
- //
- // Record stats for this message.
- //
- ACE_hrtime_t latency_from_start_of_burst =
- ACE_OS::gethrtime () - start_of_burst;
- this->latency_stats_.sample (latency_from_start_of_burst);
-
- this->throughput_stats_.sample ();
-
- if (debug >= PRINT_INDIVIDUAL_LATENCY)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) latency from start of burst: %Q\n",
- latency_from_start_of_burst));
- }
- }
- }
-
- return 0;
-}
-
-static int
-parse_args (int argc, ASYS_TCHAR *argv[])
-{
- ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("m:s:w:b:t:d:"));
- int c;
-
- while ((c = get_opt ()) != -1)
- {
- switch (c)
- {
- case 'm':
- number_of_messages = ACE_OS::atoi (get_opt.optarg);
- break;
- case 's':
- message_size = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'w':
- number_of_threads = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'b':
- burst_size = ACE_OS::atoi (get_opt.optarg);
- break;
- case 't':
- timeout_between_bursts = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'd':
- debug = ACE_static_cast (DEBUGGING_RANGE, ACE_OS::atoi (get_opt.optarg));
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s\n"
- "\t[-m number of messages]\n"
- "\t[-s message size]\n"
- "\t[-w number of threads]\n"
- "\t[-b burst size]\n"
- "\t[-t timeout between bursts]\n"
- "\t[-d debug]\n",
- argv[0]),
- -1);
- }
- }
-
- return 0;
-}
-
-int
-main (int argc, ASYS_TCHAR *argv[])
-{
- int result = parse_args (argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- move_to_rt_class ();
- ACE_High_Res_Timer::calibrate ();
-
- ACE_SYNCH_MUTEX mutex;
- ACE_SYNCH_CONDITION condition (mutex);
-
- // Leader Followers.
- Leader_Follower_Task **leader_followers = 0;
- ACE_NEW_RETURN (leader_followers,
- Leader_Follower_Task *[number_of_threads],
- -1);
-
- ACE_Profile_Timer timer;
- timer.start ();
-
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) +
- ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
-
- long flags = THR_BOUND | THR_SCHED_FIFO;
-
- // Create and activate them.
- size_t i;
- for (i = 0; i < number_of_threads; ++i)
- {
- ACE_NEW_RETURN (leader_followers[i],
- Leader_Follower_Task (mutex,
- condition),
- -1);
-
- // Activate the leader_followers.
- result = leader_followers[i]->activate (flags,
- 1,
- 1,
- priority);
- if (result != 0)
- {
- flags = THR_BOUND;
- priority = ACE_Sched_Params::priority_min (ACE_SCHED_OTHER,
- ACE_SCOPE_THREAD);
- result = leader_followers[i]->activate (flags,
- 1,
- 1,
- priority);
- if (result != 0)
- {
- return result;
- }
- }
- }
-
- // Wait for all threads to terminate.
- result = ACE_Thread_Manager::instance ()->wait ();
-
- timer.stop ();
- ACE_Rusage rusage;
- timer.elapsed_rusage (rusage);
-
- Latency_Stats latency;
- Throughput_Stats throughput;
- for (i = 0; i < number_of_threads; ++i)
- {
- latency.accumulate (leader_followers[i]->latency_stats_);
- throughput.accumulate (leader_followers[i]->throughput_stats_);
- ACE_DEBUG ((LM_DEBUG, "Thread[%d]: ", i));
- leader_followers[i]->throughput_stats_.dump_results ("", "");
- }
-
- ACE_DEBUG ((LM_DEBUG, "\nTotals for latency:\n"));
- latency.dump_results (argv[0], "latency");
-
- ACE_DEBUG ((LM_DEBUG, "\nTotals for throughput:\n"));
- throughput.dump_results (argv[0], "throughput");
-
- ACE_DEBUG ((LM_DEBUG, "\n(%t) Context switches %d/%d\n",
-#if defined(ACE_HAS_PRUSAGE_T)
- rusage.pr_vctx,
- rusage.pr_ictx));
-#else
- rusage.pr_vctx,
- rusage.pr_ictx));
-#endif /* ACE_HAS_PRUSAGE_T */
-
- for (i = 0; i < number_of_threads; ++i)
- {
- delete leader_followers[i];
- }
- delete[] leader_followers;
-
- return result;
-}
diff --git a/performance-tests/Server_Concurrency/Makefile b/performance-tests/Server_Concurrency/Makefile
deleted file mode 100644
index f12b17e7a0e..00000000000
--- a/performance-tests/Server_Concurrency/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# $Id$
-#
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-DIRS = Queue_Based_Workers \
- Leader_Follower
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU
diff --git a/performance-tests/Server_Concurrency/Queue_Based_Workers/Makefile b/performance-tests/Server_Concurrency/Queue_Based_Workers/Makefile
deleted file mode 100644
index 689bfb40dd5..00000000000
--- a/performance-tests/Server_Concurrency/Queue_Based_Workers/Makefile
+++ /dev/null
@@ -1,164 +0,0 @@
-#
-# $Id$
-#
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-BIN = workers
-
-FILES = $(BIN)
-PSRC = $(addsuffix .cpp,$(FILES))
-LOBJ = $(addsuffix .o,$(FILES))
-CPPFLAGS += -I..
-
-BUILD = $(VOBJS) $(VBIN)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/workers.o .obj/workers.so .shobj/workers.o .shobj/workers.so: workers.cpp \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config-sunos5.5.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.i \
- $(ACE_ROOT)/ace/Stream_Modules.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/High_Res_Timer.h \
- $(ACE_ROOT)/ace/High_Res_Timer.i \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/Sched_Params.i \
- ../Latency_Stats.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/performance-tests/Server_Concurrency/Queue_Based_Workers/Queue_Based_Workers.dsp b/performance-tests/Server_Concurrency/Queue_Based_Workers/Queue_Based_Workers.dsp
deleted file mode 100644
index f2104b1bbea..00000000000
--- a/performance-tests/Server_Concurrency/Queue_Based_Workers/Queue_Based_Workers.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Queue_Based_Workers" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Queue_Based_Workers - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Queue_Based_Workers.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Queue_Based_Workers.mak" CFG="Queue_Based_Workers - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Queue_Based_Workers - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Queue_Based_Workers - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Queue_Based_Workers - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Queue_Based_Workers - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Queue_Based_Workers - Win32 Release"
-# Name "Queue_Based_Workers - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\workers.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/performance-tests/Server_Concurrency/Queue_Based_Workers/Queue_Based_Workers.dsw b/performance-tests/Server_Concurrency/Queue_Based_Workers/Queue_Based_Workers.dsw
deleted file mode 100644
index 43794eb03f9..00000000000
--- a/performance-tests/Server_Concurrency/Queue_Based_Workers/Queue_Based_Workers.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Queue_Based_Workers"=".\Queue_Based_Workers.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp b/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp
deleted file mode 100644
index 7eac44c7483..00000000000
--- a/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp
+++ /dev/null
@@ -1,418 +0,0 @@
-// $Id$
-
-#include "ace/Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Profile_Timer.h"
-#include "../Latency_Stats.h"
-
-static size_t number_of_messages = 100;
-static size_t message_size = 100;
-static size_t number_of_workers = 10;
-static size_t burst_size = 10;
-static size_t timeout_between_bursts = 1;
-
-enum DEBUGGING_RANGE
-{
- NONE = 0,
- DEFAULT = 1,
- PRINT_INDIVIDUAL_LATENCY = 2
-};
-
-static DEBUGGING_RANGE debug = NONE;
-
-static ACE_Data_Block *data_block = 0;
-
-class Message_Block : public ACE_Message_Block
-{
-public:
- Message_Block (ACE_Data_Block *data_block,
- ACE_hrtime_t start_of_burst);
-
- ACE_hrtime_t start_of_burst_;
-};
-
-Message_Block::Message_Block (ACE_Data_Block *data_block,
- ACE_hrtime_t start_of_burst)
- : ACE_Message_Block (data_block),
- start_of_burst_ (start_of_burst)
-{
-}
-
-typedef ACE_Task<ACE_MT_SYNCH> TASK;
-
-class Worker_Task : public TASK
-{
-public:
- Worker_Task (ACE_Message_Queue<ACE_MT_SYNCH> *mq);
- int svc (void);
-
- size_t messages_dequeued_;
-
- Latency_Stats latency_stats_;
- Throughput_Stats throughput_stats_;
-};
-
-class IO_Task : public TASK
-{
-public:
- IO_Task (ACE_Message_Queue<ACE_MT_SYNCH> *mq);
- int svc (void);
-};
-
-Worker_Task::Worker_Task (ACE_Message_Queue<ACE_MT_SYNCH> *mq)
- : TASK (0, mq),
- messages_dequeued_ (0)
-{
-}
-
-int
-Worker_Task::svc (void)
-{
- for (;;)
- {
- ACE_Message_Block *mb = 0;
- int result = this->getq (mb);
- if (result == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Worker_Task::svc (%t) -> %p\n",
- "getq error"),
- -1);
- }
-
- ACE_Message_Block::ACE_Message_Type message_type =
- mb->msg_type ();
-
- // If STOP message, break loop and end the task.
- if (message_type == ACE_Message_Block::MB_STOP)
- {
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) stop message dequeued after %d data messages\n",
- this->messages_dequeued_));
- }
-
- mb->release ();
- break;
- }
-
- Message_Block *message_block =
- ACE_dynamic_cast (Message_Block *, mb);
-
- ACE_hrtime_t start_of_burst_for_this_message_block =
- message_block->start_of_burst_;
-
- mb->release ();
-
- // Counter.
- ++this->messages_dequeued_;
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) dequeued its %d message\n",
- this->messages_dequeued_));
- }
-
- //
- // Process message here.
- //
-
- for (size_t j = 0; j < message_size; ++j)
- {
- // Eat a little CPU
- /* takes about 40.2 usecs on a 167 MHz Ultra2 */
- u_long n = 11UL;
- ACE::is_prime (n, 2, n / 2);
- }
-
- //
- // Record stats for this message.
- //
- ACE_hrtime_t latency_from_start_of_burst =
- ACE_OS::gethrtime () - start_of_burst_for_this_message_block;
- this->latency_stats_.sample (latency_from_start_of_burst);
-
- this->throughput_stats_.sample ();
-
- if (debug >= PRINT_INDIVIDUAL_LATENCY)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) latency from start of burst: %Q\n",
- latency_from_start_of_burst));
- }
- }
-
- return 0;
-}
-
-IO_Task::IO_Task (ACE_Message_Queue<ACE_MT_SYNCH> *mq)
- : TASK (0, mq)
-{
-}
-
-int
-IO_Task::svc (void)
-{
- size_t i = 0;
- size_t messages_queued = 1;
- size_t burst = 1;
-
- // Data messages.
- while (number_of_messages > 0)
- {
- ACE_hrtime_t start_of_burst = ACE_OS::gethrtime ();
-
- for (i = 1;
- i <= burst_size && number_of_messages > 0;
- ++i, --number_of_messages, ++messages_queued)
- {
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) IO thread -> burst %d: message %d; overall message %d\n",
- burst,
- i,
- messages_queued));
- }
-
- Message_Block *message_block = 0;
- ACE_NEW_RETURN (message_block,
- Message_Block (data_block,
- start_of_burst),
- -1);
-
- int result = this->putq (message_block);
- if (result == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "IO::svc (%t) -> %p\n",
- "putq error"),
- -1);
- }
- }
-
- ++burst;
- ACE_Time_Value tv (0, timeout_between_bursts);
- ACE_OS::sleep (tv);
- }
-
- // Terminate messages.
- for (i = 0; i < number_of_workers; ++i)
- {
- ACE_Message_Block *message_block = 0;
- ACE_NEW_RETURN (message_block,
- ACE_Message_Block ((size_t)0,
- (int)ACE_Message_Block::MB_STOP),
- -1);
-
- int result = this->putq (message_block);
- if (result == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "IO::svc (%t) -> %p\n",
- "putq error"),
- -1);
- }
- }
-
- return 0;
-}
-
-static int
-parse_args (int argc, ASYS_TCHAR *argv[])
-{
- ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("m:s:w:b:t:d:"));
- int c;
-
- while ((c = get_opt ()) != -1)
- {
- switch (c)
- {
- case 'm':
- number_of_messages = ACE_OS::atoi (get_opt.optarg);
- break;
- case 's':
- message_size = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'w':
- number_of_workers = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'b':
- burst_size = ACE_OS::atoi (get_opt.optarg);
- break;
- case 't':
- timeout_between_bursts = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'd':
- debug = ACE_static_cast (DEBUGGING_RANGE, ACE_OS::atoi (get_opt.optarg));
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s\n"
- "\t[-m number of messages]\n"
- "\t[-s message size]\n"
- "\t[-w number of workers]\n"
- "\t[-b burst size]\n"
- "\t[-t timeout between bursts]\n"
- "\t[-d debug]\n",
- argv[0]),
- -1);
- }
- }
-
- return 0;
-}
-
-int
-main (int argc, ASYS_TCHAR *argv[])
-{
- int result = parse_args (argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- move_to_rt_class ();
- ACE_High_Res_Timer::calibrate ();
-
- size_t i = 0;
-
- ACE_NEW_RETURN (data_block,
- ACE_Locked_Data_Block<ACE_Lock_Adapter<ACE_SYNCH_MUTEX> >,
- -1);
-
- for (i = 0; i < number_of_messages; ++i)
- {
- data_block->duplicate ();
- }
-
- ACE_Message_Queue<ACE_MT_SYNCH> message_queue;
-
- // Workers.
- Worker_Task **workers = 0;
- ACE_NEW_RETURN (workers,
- Worker_Task *[number_of_workers],
- -1);
-
- ACE_Profile_Timer timer;
- timer.start ();
-
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) +
- ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- // priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO, priority);
-
- long flags = THR_BOUND | THR_SCHED_FIFO;
-
- // Create and activate them.
- for (i = 0; i < number_of_workers; ++i)
- {
- ACE_NEW_RETURN (workers[i],
- Worker_Task (&message_queue),
- -1);
-
- // Activate the workers.
- result = workers[i]->activate (flags,
- 1,
- 1,
- priority);
- if (result != 0)
- {
- flags = THR_BOUND;
- priority = ACE_Sched_Params::priority_min (ACE_SCHED_OTHER,
- ACE_SCOPE_THREAD);
- result = workers[i]->activate (flags,
- 1,
- 1,
- priority);
- if (result != 0)
- {
- return result;
- }
- }
- }
-
- // IO Task.
- IO_Task io (&message_queue);
-
- // Activate the workers.
- priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) +
- ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO, priority);
-
- flags = THR_BOUND | THR_SCHED_FIFO;
-
- result = io.activate (THR_BOUND);
- if (result != 0)
- {
- flags = THR_BOUND;
- priority = ACE_Sched_Params::priority_min (ACE_SCHED_OTHER,
- ACE_SCOPE_THREAD);
- result = io.activate (flags,
- 1,
- 1,
- priority);
- if (result != 0)
- {
- return result;
- }
- }
-
- // Wait for all threads to terminate.
- result = ACE_Thread_Manager::instance ()->wait ();
-
- timer.stop ();
- ACE_Rusage rusage;
- timer.elapsed_rusage (rusage);
-
- Latency_Stats latency;
- Throughput_Stats throughput;
- for (i = 0; i < number_of_workers; ++i)
- {
- latency.accumulate (workers[i]->latency_stats_);
- throughput.accumulate (workers[i]->throughput_stats_);
- ACE_DEBUG ((LM_DEBUG, "Thread[%d]: ", i));
- workers[i]->throughput_stats_.dump_results ("", "");
- }
-
- ACE_DEBUG ((LM_DEBUG, "\nTotals for latency:\n"));
- latency.dump_results (argv[0], "latency");
-
- ACE_DEBUG ((LM_DEBUG, "\nTotals for throughput:\n"));
- throughput.dump_results (argv[0], "throughput");
-
- ACE_DEBUG ((LM_DEBUG, "\n(%t) Context switches %d/%d\n",
-#if defined(ACE_HAS_PRUSAGE_T)
- rusage.pr_vctx,
- rusage.pr_ictx));
-#else
- rusage.pr_vctx,
- rusage.pr_ictx));
-#endif /* ACE_HAS_PRUSAGE_T */
-
- for (i = 0; i < number_of_workers; ++i)
- {
- delete workers[i];
- }
- delete[] workers;
- delete data_block;
-
- return result;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-template class ACE_Locked_Data_Block<ACE_Lock_Adapter<ACE_SYNCH_MUTEX> >;
-template class ACE_Lock_Adapter<ACE_SYNCH_MUTEX>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Locked_Data_Block<ACE_Lock_Adapter<ACE_SYNCH_MUTEX> >
-#pragma instantiate ACE_Lock_Adapter<ACE_SYNCH_MUTEX>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/performance-tests/Server_Concurrency/Server_Concurrency.dsw b/performance-tests/Server_Concurrency/Server_Concurrency.dsw
deleted file mode 100644
index 109214ddd0b..00000000000
--- a/performance-tests/Server_Concurrency/Server_Concurrency.dsw
+++ /dev/null
@@ -1,41 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Leader_Follower"=".\Leader_Follower\Leader_Follower.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "Queue_Based_Workers"=".\Queue_Based_Workers\Queue_Based_Workers.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/performance-tests/Server_Concurrency/run_test.sh b/performance-tests/Server_Concurrency/run_test.sh
deleted file mode 100755
index 0f45ca8f11a..00000000000
--- a/performance-tests/Server_Concurrency/run_test.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-# $Id$
-#
-
-for s in 0 25 50 75 100; do
- for w in 1 2 3 4 5 6; do
- echo ================ WORK: $s 1>&2
- echo ================ THREADS: $w 1>&2
- ./Queue_Based_Workers/workers -m 100000 -b 100000 -s $s -w $w
- ./Leader_Follower/leader_follower -m 100000 -b 100000 -s $s -w $w
- done
-done