summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-03-31 04:57:46 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-03-31 04:57:46 +0000
commit4632464f7d9c54cd6e2cac0c30728e0071bf643f (patch)
tree1f54eed78f8a9486848f228c51ce96ceb3eb225c /tests
parent55122ed57709c6e2b7393cfc2710a5b8af99a3e2 (diff)
downloadATCD-4632464f7d9c54cd6e2cac0c30728e0071bf643f.tar.gz
.
Diffstat (limited to 'tests')
-rw-r--r--tests/Message_Block_Test.cpp44
-rw-r--r--tests/Message_Queue_Test.cpp7
2 files changed, 35 insertions, 16 deletions
diff --git a/tests/Message_Block_Test.cpp b/tests/Message_Block_Test.cpp
index 70161c33c94..ddb9e989500 100644
--- a/tests/Message_Block_Test.cpp
+++ b/tests/Message_Block_Test.cpp
@@ -91,7 +91,8 @@ Worker_Task::svc (void)
// The <ACE_Task::svc_run()> method automatically adds us to the
// process-wide <ACE_Thread_Manager> when the thread begins.
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) starting svc() method\n")));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("(%t) starting svc() method\n")));
// Keep looping, reading a message out of the queue, until we get a
// message with a length == 0, which signals us to quit.
@@ -121,7 +122,8 @@ Worker_Task::svc (void)
ACE_ASSERT (count == current_count);
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) enqueueing %d duplicates\n"),
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("(%t) enqueueing %d duplicates\n"),
current_count));
ACE_Message_Block *dup;
@@ -129,7 +131,9 @@ Worker_Task::svc (void)
// Enqueue <current_count> duplicates with msg_priority == 1.
for (i = current_count; i > 0; i--)
{
- ACE_ALLOCATOR_RETURN (dup, mb->duplicate (), -1);
+ ACE_ALLOCATOR_RETURN (dup,
+ mb->duplicate (),
+ -1);
// Set the priority to be greater than "normal"
// messages. Therefore, all of these messages should go
// to the "front" of the queue, i.e., ahead of all the
@@ -143,7 +147,8 @@ Worker_Task::svc (void)
(ACE_Time_Value *) &ACE_Time_Value::zero) != -1);
}
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) dequeueing %d duplicates\n"),
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("(%t) dequeueing %d duplicates\n"),
current_count));
// Dequeue the same <current_count> duplicates.
@@ -186,7 +191,9 @@ Worker_Task::Worker_Task (void)
{
// Make us an Active Object.
if (this->activate (THR_NEW_LWP) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("activate failed")));
+ ACE_ERROR ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("activate failed")));
}
static int
@@ -221,7 +228,9 @@ produce (Worker_Task &worker_task,
if (worker_task.put (mb,
// Don't block indefinitely if we flow control...
(ACE_Time_Value *) &ACE_Time_Value::zero) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT (" (%t) %p\n"), ASYS_TEXT ("put")));
+ ACE_ERROR ((LM_ERROR,
+ ASYS_TEXT (" (%t) %p\n"),
+ ASYS_TEXT ("put")));
}
// Send a shutdown message to the waiting threads and exit.
@@ -229,15 +238,21 @@ produce (Worker_Task &worker_task,
ASYS_TEXT ("\n(%t) sending shutdown message\n")));
ACE_NEW_RETURN (mb,
- ACE_Message_Block (0, ACE_Message_Block::MB_DATA,
- 0, 0, alloc_strategy, &lock_adapter_),
+ ACE_Message_Block (0,
+ ACE_Message_Block::MB_DATA,
+ 0,
+ 0,
+ alloc_strategy,
+ &lock_adapter_),
-1);
if (worker_task.put (mb) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT (" (%t) %p\n"), ASYS_TEXT ("put")));
-
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n(%t) end producer\n")));
+ ACE_ERROR ((LM_ERROR,
+ ASYS_TEXT (" (%t) %p\n"),
+ ASYS_TEXT ("put")));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("\n(%t) end producer\n")));
return 0;
}
@@ -246,7 +261,6 @@ typedef ASYS_TCHAR MEMORY_CHUNK[ACE_MALLOC_ALIGN * ACE_ALLOC_SIZE];
ACE_Cached_Allocator<MEMORY_CHUNK,
ACE_SYNCH_MUTEX>
mem_allocator (ACE_ALLOC_AMOUNT);
-
struct
{
ACE_Allocator *strategy_;
@@ -325,9 +339,11 @@ main (int, ASYS_TCHAR *[])
for (i = 0; i < ACE_ALLOC_STRATEGY_NO; i++)
ACE_DEBUG ((LM_DEBUG,
ASYS_TEXT ("Elapsed time using %s allocation strategy: %f sec\n"),
- alloc_struct[i].name_, alloc_struct[i].et_.real_time));
+ alloc_struct[i].name_, alloc_
+ struct[i].et_.real_time));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) Exiting...\n")));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("(%t) Exiting...\n")));
#else
ACE_ERROR ((LM_INFO,
ASYS_TEXT ("threads not supported on this platform\n")));
diff --git a/tests/Message_Queue_Test.cpp b/tests/Message_Queue_Test.cpp
index 0944657ff28..3765e2020bd 100644
--- a/tests/Message_Queue_Test.cpp
+++ b/tests/Message_Queue_Test.cpp
@@ -235,7 +235,9 @@ single_thread_performance_test (int queue_type = 0)
// heap in case messages is large relative to the amount of
// stack space available.
ACE_Message_Block *receive_block;
- ACE_NEW_RETURN (receive_block, ACE_Message_Block[messages], -1);
+ ACE_NEW_RETURN (receive_block,
+ ACE_Message_Block[messages],
+ -1);
for (i = 0; i < messages; ++i)
{
@@ -432,7 +434,8 @@ performance_test (int queue_type = 0)
ACE_Thread_Manager::instance ()->wait ();
ACE_Time_Value tv;
timer->elapsed_time (tv);
- ACE_DEBUG ((LM_INFO, ASYS_TEXT ("%s: %u messages took %u msec (%f msec/message)\n"),
+ ACE_DEBUG ((LM_INFO,
+ ASYS_TEXT ("%s: %u messages took %u msec (%f msec/message)\n"),
ASYS_WIDE_STRING (message),
messages,
tv.msec (),