From: <jsa...@us...> - 2008-11-07 22:11:10
|
Revision: 71 http://flexotask.svn.sourceforge.net/flexotask/?rev=71&view=rev Author: jsauerbach Date: 2008-11-07 22:11:07 +0000 (Fri, 07 Nov 2008) Log Message: ----------- Remove dependency on TuningFork since this test should be able to be used with just the bare flexotask feature. Modified Paths: -------------- trunk/flexotask-functiontest/src/highfreqread/Main.java Modified: trunk/flexotask-functiontest/src/highfreqread/Main.java =================================================================== --- trunk/flexotask-functiontest/src/highfreqread/Main.java 2008-11-07 22:10:30 UTC (rev 70) +++ trunk/flexotask-functiontest/src/highfreqread/Main.java 2008-11-07 22:11:07 UTC (rev 71) @@ -18,11 +18,8 @@ import java.util.Map; import java.util.Set; -import org.junit.Test; - import com.ibm.realtime.flexotask.AtomicException; import com.ibm.realtime.flexotask.FlexotaskGraph; -import com.ibm.realtime.flexotask.system.FlexotaskValidator; import com.ibm.realtime.flexotask.template.FlexotaskStableMode; import com.ibm.realtime.flexotask.template.FlexotaskTaskTemplate; import com.ibm.realtime.flexotask.template.FlexotaskTemplate; @@ -32,7 +29,7 @@ import com.ibm.realtime.flexotask.tracing.InterarrivalTracer; import com.ibm.realtime.flexotask.tracing.IntervalStatistics; import com.ibm.realtime.flexotask.tracing.TaskByNameTracerFactory; -import com.ibm.realtime.flexotask.tuningfork.TFTracerFactory; +import com.ibm.realtime.flexotask.tracing.TracingSupport; public class Main { @@ -74,22 +71,15 @@ stable.add(Channel[].class.getName()); stable.add(State.class.getName()); - /* Determine if TF tracing is requested and enable it (only tracing to port is supported) */ - String tracing = System.getProperty("TF_TRACE"); - if (tracing != null && tracing.length() > 0) { - int port = Integer.parseInt(tracing); - FlexotaskValidator.setTracer(new TFTracerFactory(port)); - } else { - /* Use interarrival tracer instead */ - int reportAt = (int)((long) runlength * 1000 * 1000 / period); - int jitter = period / 20; - long[] range = {period - jitter, period + jitter}; - IntervalStatistics stats = new IntervalStatistics("Test", reportAt, new long[][]{range}); - InterarrivalTracer tracer = new InterarrivalTracer(stats, stats); - TaskByNameTracerFactory factory = new TaskByNameTracerFactory(1, false); - factory.addTask("Test", tracer); - FlexotaskValidator.setTracer(factory); - } + /* Establish tracing */ + int reportAt = (int)((long) runlength * 1000 * 1000 / period); + int jitter = period / 20; + long[] range = {period - jitter, period + jitter}; + IntervalStatistics stats = new IntervalStatistics("Test", reportAt, new long[][]{range}); + InterarrivalTracer tracer = new InterarrivalTracer(stats, stats); + TaskByNameTracerFactory factory = new TaskByNameTracerFactory(1, false); + factory.addTask("Test", tracer); + TracingSupport.setTracer(factory); /* Start competing allocation thread to cause frequent GCs */ String alloc = System.getProperty("ALLOCATION_RATE"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |