You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Bruce Barrett <br...@ebrary.com> on 2001/11/02 01:40:32 UTC

Better patches for Filer.java

All,

Although the last set of diffs for "Filer.java" will work, I managed 
to leave some "cruft" in. This is simpler set of diffs for Filer.java.
No change in the other files, those diffs are OK.

--Bruce



Index: Filer.java
===================================================================
RCS file: /home/cvspublic/jakarta-jmeter/src/org/apache/jmeter/reporters/Filer.java,v
retrieving revision 1.11
diff -r1.11 Filer.java
58a59,60
> import java.util.Date;
> import java.text.*;
82a85,86
>   private boolean elapsetime = false;
>   private boolean timeoday = false;
84a89,90
>   private boolean usetabs = true;
>   private boolean heading = true;
128a135,170
>   public void setHeading(boolean h){
> 			 heading = h;
>   }
> 
>   public boolean getHeading()
>   {
> 	 return heading;
>   }
> 
>   public void setElapseTime(boolean et){
> 			 elapsetime = et;
>   }
> 
>   public boolean getElapseTime()
>   {
> 	 return elapsetime;
>   }
> 
>   public void setTimeOD(boolean tod){
> 			 timeoday = tod;
>   }
> 
>   public boolean getTimeOD()
>   {
> 	 return timeoday;
>   }
> 
>   public void setUseTabs(boolean t){
> 			 usetabs = t;
>   }
> 
>   public boolean getUseTabs()
>   {
> 	 return usetabs;
>   }
> 
176a219
> 		String seperator = "   ";
179a223,236
> 		  if (usetabs) {
> 		    seperator = "\t";
> 		  }
> 		  if (elapsetime) {
>                       stream.print(sample + seperator);
>                   }
> 		  if (timeoday) {
> 		    DateFormat shortdate = DateFormat.getDateInstance(DateFormat.SHORT);
> 		    DateFormat shorttime = DateFormat.getTimeInstance(DateFormat.MEDIUM);
> 		    Date now = new Date();
> 		    DateFormat full = DateFormat.getDateTimeInstance( DateFormat.FULL, DateFormat.FULL);
> 		    stream.print(shortdate.format(now) + seperator + shorttime.format(now) + seperator ); 
>                   }
> 
181c238
< 			 stream.print(sampleResult.getValue(SampleResult.SAMPLE_LABEL) + " " + sample);
---
> 			 stream.print(sampleResult.getValue(SampleResult.SAMPLE_LABEL) + seperator);
183c240
< 				stream.println(HttpSampleResult.DATA_SEPARATOR + data);
---
> 				stream.print(data);			// was: HttpSampleResult.DATA_SEPARATOR +
185c242
< 				stream.println("");
---
> 				stream.print("");
187c244
< 			 stream.println(sample);
---
> 
189a247
> 		stream.println("");
196,201c254,268
< 		if (verbose) {
< 		  this.stream.println("\n# Sample data created by " + JMeterUtils.getJMeterProperties().getProperty("version"));
< 		  if(viewSubmitData)
< 			 this.stream.println("\n#       URL                    Milliseconds  Data\n");
< 		  else
< 			 this.stream.println("\n#       URL                    Milliseconds\n");
---
> 		if (heading) {
> 		  String seperator = "   ";
> 		  if (usetabs) {
> 		    seperator = "\t";
> 		  }
> 
> 		  this.stream.print("\n# Sample data created by " + JMeterUtils.getJMeterProperties().getProperty("version") + "\n# ");
> 		  if(elapsetime)
> 			 this.stream.print("Milliseconds" + seperator);
> 		  if (timeoday)
> 			 this.stream.print("Time-of-day" + seperator);
> 		  if (verbose)
> 			 this.stream.print("URL" + seperator);
> 
> 		  this.stream.println("");



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>