From: jjenista Date: Thu, 11 Nov 2010 18:38:14 +0000 (+0000) Subject: display elapsed time to help choose plot parameters and add arrow heads, remove palet... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5546f4e2f852509e4311999500c7cee5e49fbef5;p=IRC.git display elapsed time to help choose plot parameters and add arrow heads, remove palette mode for line colors --- diff --git a/Robust/CoreProf/Trace.java b/Robust/CoreProf/Trace.java index 0db91ad8..7d9eefd8 100644 --- a/Robust/CoreProf/Trace.java +++ b/Robust/CoreProf/Trace.java @@ -138,6 +138,10 @@ public class Trace { long mintime; long scale; + long minObservedTime = Long.MAX_VALUE; + long maxObservedTime = Long.MIN_VALUE; + + public Trace( boolean c2txt, String inFile, String outFile, HashSet eventset, long mintime, long maxtime, long scale) { this.eventset=eventset; this.maxtime=maxtime; @@ -158,6 +162,12 @@ public class Trace { readThread( i ); } + System.out.println( "Minimum observed time stamp: "+minObservedTime ); + System.out.println( "Maximum observed time stamp: "+maxObservedTime ); + + System.out.println( "\nelapsed time: "+(maxObservedTime - minObservedTime) ); + + printStats( outFile ); if( convert2plot ) { @@ -335,6 +345,16 @@ public class Trace { timeStamp = readLong( tdata.dataStream ); i += 3; + + if( timeStamp < minObservedTime ) { + minObservedTime = timeStamp; + } + + if( timeStamp > maxObservedTime ) { + maxObservedTime = timeStamp; + } + + int eventType = eventRaw & CP_EVENT_MASK; int eventID = eventRaw >> CP_EVENT_BASESHIFT; @@ -527,7 +547,7 @@ public class Trace { if (nstart<0) nstart=0; bwPlot.write( "set arrow from "+(nstart/scale)+","+thread+ - " to "+(nend/scale)+","+thread+" lt palette cb "+eventID+" nohead\n"); + " to "+(nend/scale)+","+thread+" lt "+eventID+"\n"); } } catch( IOException e ) { e.printStackTrace();