wm geom .konsola 525x664+485+36; wm withdraw .; wm withdraw .output; kons_font 15 ## cli combat dla ser mico/cpp # + jest problem z met4(), # nie mozna przekazac VT do tej metody... # czy to problem combata??? # a moze cos nie tak w impl. met. met4 ??? # lappend auto_path ~/zajecia/tas/corba/combat-tcl-0.7.4 package re combat #% 0.7 #corba::init -ORBDebug all source Hello2.tcl combat::ir add $_ir_Hello2 set o1 [corba::string_to_object file://[pwd]/Hello.ior] #% _combat_obj_1 $o1 sayHello #% a ku ku !!! $o1 met1 {1 2 3 4 5 6} #% 123 321 3 4 5 6 $o1 podajLiczbe #% 2 #% 1 #% 0 #$o1 sayHello2 "qqq" # + exit time {$o1 zwrocMacierz 50 50} #% 171003 microseconds per iteration #% 172525 microseconds per iteration $o1 zwrocMacierz 1 3 #% {123.123001099 123.123001099 123.123001099} $o1 zwrocMacierz 3 1 #% 123.123001099 123.123001099 123.123001099 join [$o1 zwrocMacierz 3 4] \n #% 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 join [$o1 zwrocMacierz 5 4] \n #% 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 123.123001099 #string len [$o1 zwrocMacierz 1000 100] #% 1401999 string len [$o1 zwrocMacierz 1000 300] #% 4201999 time {string len [$o1 zwrocMacierz 1000 300]} #% 22344904 microseconds per iteration #% 22160037 microseconds per iteration # + cpp/combat; nie ma roznicy !!! #% 21226328 microseconds per iteration #% 21207636 microseconds per iteration # + tcl/combat #string len [$o1 zwrocMacierz 1000 1000] #% 14001999 # + nie ma wycieku pamieci na serwerze!! # + widac, ze dzialanie serw. corbowego jest blyskawiczne! # widac to po ". ps000" source ~/tcl/mh_lib.tcl proc mojalista n { iterate i $n {lappend _ $i} return $_ } mojalista 15 #% 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 llength [set dluga_lista [mojalista 100000]] #% 100000 llength [$o1 met1 $dluga_lista] #% 100000 lrange [$o1 met1 $dluga_lista] 0 10 #% 123 321 2 3 4 5 6 7 8 9 10 # + nie widac wyciekow pamieci w np000... # + jednak valgrind dziwnie sie zachowuje... catch {$o1 met2 {{i1 111 s1 "qqq"}}} err; set err #% IDL:omg.org/CORBA/MARSHAL:1.0 {minor 0 completion_status COMPLETED_NO} $o1 met2 {{i1 111 s1 "qqq"} {i1 222 s1 "www"} {i1 333 s1 "eee"}} #% {i1 111 s1 qqq} {i1 222 s1 www} {i1 333 s1 eee} $o1 met2 {{i1 321 s1 "qqq"} {i1 222 s1 "www"} {i1 333 s1 "eee"}} #% {i1 321 s1 qqq} {i1 222 s1 www} {i1 333 s1 eee} $o1 met3 {} #% $o1 met3 {{i1 123 s1 "qqq ??? www"}} #% {i1 123 s1 {qqq ??? www}} $o1 met3 {{i1 123 s1 "qqq ???"} {i1 222 s1 "www"}} #% {i1 123 s1 {qqq ???}} {i1 222 s1 www} $o1 met4 0 #% i1 123 s1 {A ku ku !!!} _tc_ {valuetype IDL:HelloApp/qqq:1.0 {public i1 long public s1 string} 0 {}} $o1 met4 {i1 111 s1 {A ku ku !!!}} #% i1 111 s1 {A ku ku !!!} _tc_ {valuetype IDL:HelloApp/qqq:1.0 {public i1 long public s1 string} 0 {}} $o1 met4 {i1 22222 s1 {A ku ku !!!} _tc_ {valuetype IDL:HelloApp/qqq:1.0 {public i1 long public s1 string} 0 {}}} #% i1 22222 s1 {A ku ku !!!} _tc_ {valuetype IDL:HelloApp/qqq:1.0 {public i1 long public s1 string} 0 {}} exit