[j-sim-users] why so slow

zcm3518 zcm3518 at 163.com
Tue Oct 10 09:52:56 CDT 2006


Hi,
Everyone.
I read the following script and run it on my computer:
<http://www.j-sim.org/experiment/ex1/j-sim/onebottleneck.tcl>
It finished in 10 second. That is good.
I add some codes just before <puts "Start simulation"> to get some visual
feel, and run it again 
It now needs several hundreds seconds to finish.
Why the following code lines make the execution time of the script become so
long?
Is it possible to diminish the execution time?  3x
==============================================================
puts "Set up TrafficMonitor & Plotter..."
set plot_ [mkdir drcl.comp.tool.Plotter .plot]

for {set i 0} {$i<$nc_} {incr i} {
	set k [expr $i+2+$nc_]
     mkdir drcl.net.tool.TrafficMonitor .tm$k
	connect -c h$k/csl/6 at up -to .tm$k/in@
	connect -c .tm$k/bytecount@ -to $plot_/$i at 0
	connect -c h$k/tcpsink/seqno@ -to $plot_/$i at 2
}
! .tm[expr 2+$nc_]-[expr 1+2*$nc_] configure 10.0 10.0; # window size,
update interval
for {set i 0} {$i<$nc_} {incr i} {
	set j [expr $i+2]
	connect -c h$j/tcp/cwnd@ -to $plot_/$i at 1
	connect -c h$j/tcp/srtt@ -to $plot_/$i at 3
}

-----ÓʼþÔ­¼þ-----
·¢¼þÈË: j-sim-users-bounces at cs.uiuc.edu [mailto:j-sim-users-bounces at cs.uiuc.
edu] ´ú±í David Liu
·¢ËÍʱ¼ä: 2006Äê10ÔÂ10ÈÕ 3:31
ÊÕ¼þÈË: j-sim-users at cs.uiuc.edu
Ö÷Ìâ: [j-sim-users] Child Exposure problem in Tutorial

I am running the latest J-Sim and working out the Tutorial in Windows XP
Professional using make
I have the following problem when run Example 3 in the Section 4 of
Tutorial

TCL0> set c [java::new HelloWorld]
java0x3
TCL0> set parent [java::new drcl.comp.Component]
java0x4
TCL0> $parent addComponent $c
TCL0> $parent expose $c
TCL0> [$parent getPort "greetings"] connectTo [! /.term/tcl0/result@]
java.lang.NullPointerException 	at
drcl.comp.Port.doSending(Port.java:1024) 	at
drcl.comp.Port.doLastSending(Port.java:1040) 	at
drcl.ruv.Shell._println(Shell.java:335) 	at
drcl.ruv.Shell.process(Shell.java:186) 	at
drcl.comp.TaskReceive.execute(TaskReceive.java:71) 	at
drcl.comp.AWorkerThread.run(AWorkerThread.java:316) Thread[0,3,ruv0],
FINISHING
Context=/.term/tcl0_shell/cmd@,ShellContract_REQ:exec_cmd--content:[$parent
getPort "greetings"] connectTo [! /.term/tcl0/result@]
Next_Task=<null>
Locks: <not implemented yet>
#arrivals: 11
last_sleepOn: Thread[0,3,ruv0]
last_wkUp_thread: Thread[AWT-EventQueue-0,10,main]


Please help.

David

David Q. Liu, Ph.D.
Assistant Professor  of CS
Indiana U. - Purdue U. Fort Wayne
http://users.ipfw.edu/liud
_______________________________________________
j-sim-users mailing list
j-sim-users at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/j-sim-users





More information about the j-sim-users mailing list