cvs commit: jakarta-jmeter/bin jmeter.properties

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cvs commit: jakarta-jmeter/bin jmeter.properties

sebb-3
sebb        2005/05/07 14:53:06

  Modified:    src/core/org/apache/jmeter/gui/action Save.java
               src/core/org/apache/jmeter/save SaveService.java
               src/core/org/apache/jmeter/reporters ResultCollector.java
               bin      jmeter.properties
  Log:
  Allow separate specification of file_format for test plans and test logs
 
  Revision  Changes    Path
  1.27      +3 -3      jakarta-jmeter/src/core/org/apache/jmeter/gui/action/Save.java
 
  Index: Save.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/gui/action/Save.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Save.java 7 May 2005 21:18:03 -0000 1.26
  +++ Save.java 7 May 2005 21:53:06 -0000 1.27
  @@ -156,7 +156,7 @@
    FileOutputStream ostream=null;
           try
           {
  -            if(JMeterUtils.getPropDefault("file_format","2.1").equals("2.0"))
  +            if(SaveService.isSaveTestPlanFormat20())
               {
    ostream=new FileOutputStream(updateFile);
                   OldSaveService.saveSubTree(subTree,ostream);
 
 
 
  1.55      +16 -0     jakarta-jmeter/src/core/org/apache/jmeter/save/SaveService.java
 
  Index: SaveService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/save/SaveService.java,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- SaveService.java 24 Apr 2005 19:18:58 -0000 1.54
  +++ SaveService.java 7 May 2005 21:53:06 -0000 1.55
  @@ -302,6 +302,22 @@
         }
      }
   
  +   public static boolean isSaveTestPlanFormat20()
  +   {
  +       return
  +       JMeterUtils.getPropDefault("file_format.testplan","2.1").equals("2.0")
  +       ||
  +       JMeterUtils.getPropDefault("file_format","2.1").equals("2.0");
  +   }
  +  
  +   public static boolean isSaveTestLogFormat20()
  +   {
  +       return
  +       JMeterUtils.getPropDefault("file_format.testlog","2.1").equals("2.0")
  +       ||
  +       JMeterUtils.getPropDefault("file_format","2.1").equals("2.0");
  +   }
  +  
      public static class Test extends JMeterTestCase
      {
         public Test()
 
 
 
  1.48      +2 -3      jakarta-jmeter/src/core/org/apache/jmeter/reporters/ResultCollector.java
 
  Index: ResultCollector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/reporters/ResultCollector.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- ResultCollector.java 22 Apr 2005 17:40:08 -0000 1.47
  +++ ResultCollector.java 7 May 2005 21:53:06 -0000 1.48
  @@ -57,7 +57,6 @@
   import org.apache.jmeter.testelement.TestListener;
   import org.apache.jmeter.testelement.property.BooleanProperty;
   import org.apache.jmeter.testelement.property.ObjectProperty;
  -import org.apache.jmeter.util.JMeterUtils;
   import org.apache.jorphan.logging.LoggingManager;
   import org.apache.log.Logger;
   import org.xml.sax.SAXException;
  @@ -421,8 +420,8 @@
       private void recordResult(SampleResult result) throws Exception {
           if (out != null) {
               if (!isResultMarked(result) && !this.isStats) {
  -                if (JMeterUtils.getPropDefault("file_format", "2.1").equals(
  -                        "2.0")) {
  +                if (SaveService.isSaveTestLogFormat20())
  +                {
                       if (serializer == null)
                           serializer = new DefaultConfigurationSerializer();
                       out.write(getSerializedSampleResult(result));
 
 
 
  1.118     +6 -1      jakarta-jmeter/bin/jmeter.properties
 
  Index: jmeter.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/bin/jmeter.properties,v
  retrieving revision 1.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- jmeter.properties 18 Apr 2005 20:21:12 -0000 1.117
  +++ jmeter.properties 7 May 2005 21:53:06 -0000 1.118
  @@ -26,7 +26,12 @@
   
   #File format for saved test files.  JMeter 2.1 uses a new format. Set value to 2.0 to save to old
   # format
  +# Save test plans and test logs in 2.0 format
   #file_format=2.0
  +# Just test plans (jmx)
  +#file_format.testplan=2.0
  +# Just test logs (jtl)
  +#file_format.testlog=2.0
   
   # Authorization
   authorization=authorization
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]