From 414f4bd7e70d94025576d9264c86da63c506f6ca Mon Sep 17 00:00:00 2001 From: rpj Date: Wed, 13 Aug 2003 15:10:53 +0000 Subject: Bug fixes plus adaptation to current MinGW/MsysDTK environment. Changes to tests/benchmarks. --- tests/benchtest2.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/benchtest2.c') diff --git a/tests/benchtest2.c b/tests/benchtest2.c index e1362d1..9c614b5 100644 --- a/tests/benchtest2.c +++ b/tests/benchtest2.c @@ -168,7 +168,7 @@ runTest (char * testNameString, int mType) assert(pthread_mutex_destroy(&gate2) == 0); assert(pthread_mutex_destroy(&gate1) == 0); durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs; - printf( "%-40s %15ld %15.3f\n", + printf( "%-45s %15ld %15.3f\n", testNameString, durationMilliSecs, (float) durationMilliSecs * 1E3 / ITERATIONS / 4 /* Four locks/unlocks per iteration */); @@ -180,15 +180,15 @@ main (int argc, char *argv[]) { assert(pthread_mutexattr_init(&ma) == 0); - printf( "========================================================================\n"); + printf( "=============================================================================\n"); printf( "\nLock plus unlock on an unlocked mutex.\n"); printf("%ld iterations, four locks/unlocks per iteration.\n\n", ITERATIONS); - printf( "%-40s %15s %15s\n", + printf( "%-45s %15s %15s\n", "Test", "Total(msec)", "average(usec)"); - printf( "------------------------------------------------------------------------\n"); + printf( "-----------------------------------------------------------------------------\n"); /* * Time the loop overhead so we can subtract it from the actual test times. @@ -226,7 +226,7 @@ main (int argc, char *argv[]) DeleteCriticalSection(&cs2); DeleteCriticalSection(&cs1); durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs; - printf( "%-40s %15ld %15.3f\n", + printf( "%-45s %15ld %15.3f\n", "Simple Critical Section", durationMilliSecs, (float) durationMilliSecs * 1E3 / ITERATIONS / 4 ); @@ -253,8 +253,8 @@ main (int argc, char *argv[]) assert(old_mutex_destroy(&ox2) == 0); assert(old_mutex_destroy(&ox1) == 0); durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs; - printf( "%-40s %15ld %15.3f\n", - "PT Mutex using a Critical Section (WNT)", + printf( "%-45s %15ld %15.3f\n", + "Old PT Mutex using a Critical Section (WNT)", durationMilliSecs, (float) durationMilliSecs * 1E3 / ITERATIONS / 4); @@ -280,12 +280,12 @@ main (int argc, char *argv[]) assert(old_mutex_destroy(&ox2) == 0); assert(old_mutex_destroy(&ox1) == 0); durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs; - printf( "%-40s %15ld %15.3f\n", - "PT Mutex using a Win32 Mutex (W9x)", + printf( "%-45s %15ld %15.3f\n", + "Old PT Mutex using a Win32 Mutex (W9x)", durationMilliSecs, (float) durationMilliSecs * 1E3 / ITERATIONS / 4); - printf( "........................................................................\n"); + printf( ".............................................................................\n"); /* * Now we can start the actual tests @@ -302,7 +302,7 @@ main (int argc, char *argv[]) runTest("Blocking locks", 0); #endif - printf( "========================================================================\n"); + printf( "=============================================================================\n"); /* * End of tests. */ -- cgit v1.2.3