Commits

Anonymous committed 63b1904

performance evaluation... R13B03 is very fast.

Comments (0)

Files changed (3)

 
 * Current Status 
 
-  Working well. But Erlang linkedin driver (say, port) said to be bottleneck,
- But port_control runs in the same thread context with Erlang code. 
- Simple performance test (written in porformer.erl) shows the result that,
- insertion performance reaches 6500 qps, and lookup performance reaches 
- 29000 qps; is this a row performance of Tokyo Cabinet? (I expect TC makes
- much better performance)
-  
+  Working well. Most part is re-written as Erlang Native Interface Functions
+ got avilable from R13B03. From Linkedin drivers to NIFs.
   Currently, and Temporarily, it compiles in MacOSX and Debian 
   (and somehow CentOS). See ebin/tctest.erl for sample programs.
 
 * Compilation
   just do `make b` in top directory.
-
+  `make test` for basic unit tests.
 
 * ROADMAP
 

c_src/raw_performer.c

   for( counter = 0 ; counter < data->Nrec ; ++counter ){
     get_random_char(key, 16);
     char * value = tcadbget2( data->adb, get_static_char(16) );
-    usleep(1000);
+    //    usleep(1000);
     if( value == NULL ){
       fprintf(stderr, "%d: tcadbget2 failed.\n", __LINE__);
     }
   for( counter = 0 ; counter < data->Nrec ; ++counter ){
     get_random_char(key, 16);
     get_random_char(value, 128);
-    usleep(1000);
+    //    usleep(1000);
     if( ! tcadbput2( data->adb, key, value ) ){
       fprintf(stderr, "%d: tcadbput2 failed.\n", __LINE__);
     }else{

src/performer.erl

     Results.
 
 test_yatce(NumThread, NumOperation, Interval)->
-    ok=application:start(yatce),
-    TCADB = yatce:db('performance_test.tch', []),
-    {ok,opened}=TCADB:open(),
+    Table = 'performance_test.tch',
+    ok=tcadb:init(),
+    ok=tcadb:open(Table,[]),
     Coordinator = self(),
 
     List = get_list( NumThread, nil ),
     Fun = fun(Key, Value) -> 
-		  {ok,inserted} = TCADB:put(Key,Value) ,
-		  {ok, Value} = TCADB:get(Key)		 
+		  {ok,inserted} = tcadb:put(Table,Key,Value) ,
+		  {ok, Value} = tcadb:get(Table,Key)		 
 	  end,
     lists:map( fun(_)-> spawn( fun()-> Result = r(Fun, NumOperation, Interval),
 				       Coordinator ! Result end) end, List),
     Results = lists:map( fun(_)-> receive Result -> Result end end, List ),
-    {ok,closed}=TCADB:close(),
-    application:stop(yatce),
+    ok=tcadb:close(Table),
     Results.
     
 % you need tcerl installed.
     random:seed(A1, A2, A3),
     [NumThread, NumOperation, _Interval] = Argv,
     io:format("processing ~p records (qps):~n", [ NumOperation * NumThread ] ),
-    Testcases = [ test_ets, test_dets, test_yatce, test_tcerl],
+    Testcases = [ test_ets, test_dets, test_yatce ],% test_tcerl],
     run(Testcases, Argv).
 
 run([], _)-> [];