Permalink
Browse files

additional fixups

  • Loading branch information...
1 parent f4f3860 commit d232aac75cf15f89ebbd631c28c72e6a6f6550fd Daniel (dmilith) Dettlaff committed Sep 20, 2008
Showing with 12 additions and 7 deletions.
  1. +0 −1 job.cpp
  2. +9 −0 tests/Sconstruct
  3. +3 −6 tests/jobs/job_thread_test.cpp
View
1 job.cpp
@@ -64,7 +64,6 @@ Job::run() {
break;
case action_ATTACK:
get_actor( 0 ).set_mana( 666 );
-
#ifdef DEBUG
cout << "A:" << action_ATTACK << flush;
cout << "A#" << actor0.get_mana() << flush;
View
9 tests/Sconstruct
@@ -7,6 +7,8 @@
"""
+Decider('MD5')
+
release = Environment( CXX = 'g++ -O0 -ggdb -W' )
release.Program('test_sha1_speed_threads' , 'hashlib/sha1_speed_test_with_threads.cpp',
LIBS=[ 'boost_thread', 'hl-sha', 'job', 'character', 'coordinates',
@@ -112,3 +114,10 @@ release15.Program('test_job_thread_0' , 'jobs/job_thread_test.cpp',
'item', 'map', 'place', 'soul', 'theritory',
'world', 'purecore'],
LIBPATH=[ '.', '../', '/usr/local/lib', '/usr/lib' ])
+
+#release16 = Environment( CC = 'gdc' )
+#release16.Program('test_D_0' , 'D/assertions.d',
+# LIBS=[ 'hl-sha', 'purecore', 'job', 'character', 'coordinates',
+# 'item', 'map', 'place', 'soul', 'theritory',
+# 'world'],
+# LIBPATH=[ '.', '../', '/usr/local/lib', '/usr/lib' ])
View
9 tests/jobs/job_thread_test.cpp
@@ -11,7 +11,7 @@
#include "../../hashlib/hl_tools.h"
#include "../../coordinates.h"
#include "../../version.h"
-#include "../../config.h"
+//#include "../../config.h"
#include "../../job.h"
#include "../../soul.h"
@@ -22,9 +22,8 @@ using namespace core;
extern void create_job( Cobject* object0, Cobject* object1 );
-#define DEBUG
#define VERBOSE
-
+#undef DEBUG
//Csoul souls[5000];
@@ -64,7 +63,7 @@ main( int argc, char* argv[] ) {
time_t start = time( NULL );
boost::xtime xt;
boost::thread_group threads;
- for ( int i = 0; i < 10000; ++i ) { /* on my machine 77824 is max, but 32760 is max after which boost_resource error
+ for ( int i = 0; i < 5000; ++i ) { /* on my machine 77824 is max, but 32760 is max after which boost_resource error
is raised. ( cat /proc/sys/kernel/threads-max ) */
threads.create_thread( &run );
// boost::xtime_get( &xt, boost::TIME_UTC );
@@ -76,11 +75,9 @@ main( int argc, char* argv[] ) {
#endif
}
-#ifdef DEBUG
cout << "Done. Quitting." << endl;
cout << time( NULL ) - start << "seconds";
assert( time( NULL) - start <= 10 );
-#endif
threads.join_all();
return 0;
}

0 comments on commit d232aac

Please sign in to comment.