jsalvata    2003/12/01 16:26:07

  Modified:    src/core/org/apache/jmeter/resources messages_no.properties
                        messages.properties messages_ja.properties
                        messages_de.properties
               src/protocol/http/org/apache/jmeter/protocol/http/proxy
                        ProxyControl.java
               xdocs/usermanual component_reference.xml
               src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui
                        ProxyControlGui.java
  Log:
  GUI work to allow other sample grouping modes.
  No functionality changes, yet.
  
  Revision  Changes    Path
  1.58      +5 -0      
jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_no.properties
  
  Index: messages_no.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_no.properties,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- messages_no.properties    1 Dec 2003 01:19:13 -0000       1.57
  +++ messages_no.properties    2 Dec 2003 00:26:07 -0000       1.58
  @@ -162,6 +162,11 @@
   graph_results_no_samples=No of Samples
   graph_results_throughput=Throughput
   graph_results_title=Graf resultater
  +grouping_mode=Grouping:
  +grouping_no_groups=Do not group samplers
  +grouping_add_separators=Add separators between groups
  +grouping_in_controllers=Put each group in a new controller
  +grouping_store_first_only=Store 1st sampler of each group only
   header_manager_title=HTTP header manager
   headers_stored=Headere lagret hos headermanager
   help=Hjelp
  
  
  
  1.75      +5 -0      
jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- messages.properties       1 Dec 2003 01:19:13 -0000       1.74
  +++ messages.properties       2 Dec 2003 00:26:07 -0000       1.75
  @@ -162,6 +162,11 @@
   graph_results_no_samples=No of Samples
   graph_results_throughput=Throughput
   graph_results_title=Graph Results
  +grouping_mode=Grouping:
  +grouping_no_groups=Do not group samplers
  +grouping_add_separators=Add separators between groups
  +grouping_in_controllers=Put each group in a new controller
  +grouping_store_first_only=Store 1st sampler of each group only
   header_manager_title=HTTP Header Manager
   headers_stored=Headers Stored in the Header Manager
   help=Help
  
  
  
  1.59      +5 -0      
jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_ja.properties
  
  Index: messages_ja.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_ja.properties,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- messages_ja.properties    1 Dec 2003 01:19:13 -0000       1.58
  +++ messages_ja.properties    2 Dec 2003 00:26:07 -0000       1.59
  @@ -162,6 +162,11 @@
   graph_results_no_samples=\u30b5\u30f3\u30d7\u30eb\u306a\u3057
   graph_results_throughput=\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8
   graph_results_title=\u30b0\u30e9\u30d5\u8868\u793a
  +grouping_mode=Grouping:
  +grouping_no_groups=Do not group samplers
  +grouping_add_separators=Add separators between groups
  +grouping_in_controllers=Put each group in a new controller
  +grouping_store_first_only=Store 1st sampler of each group only
   header_manager_title=HTTP \u30d8\u30c3\u30c0\u30de\u30cd\u30fc\u30b8\u30e3
   
headers_stored=\u30d8\u30c3\u30c0\u30fc\u30de\u30cd\u30fc\u30b8\u30e3\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u30d8\u30c3\u30c0
   help=\u30d8\u30eb\u30d7
  
  
  
  1.62      +5 -0      
jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_de.properties
  
  Index: messages_de.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_de.properties,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- messages_de.properties    1 Dec 2003 01:19:13 -0000       1.61
  +++ messages_de.properties    2 Dec 2003 00:26:07 -0000       1.62
  @@ -162,6 +162,11 @@
   graph_results_no_samples=Nr. von Samples
   graph_results_throughput=Durchsatz
   graph_results_title=Graph Results
  +grouping_mode=Grouping:
  +grouping_no_groups=Do not group samplers
  +grouping_add_separators=Add separators between groups
  +grouping_in_controllers=Put each group in a new controller
  +grouping_store_first_only=Store 1st sampler of each group only
   header_manager_title=HTTP Header Manager
   headers_stored=Headers gespeichert im Header Manager
   help=Hilfe
  
  
  
  1.38      +13 -7     
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
  
  Index: ProxyControl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- ProxyControl.java 1 Dec 2003 20:15:16 -0000       1.37
  +++ ProxyControl.java 2 Dec 2003 00:26:07 -0000       1.38
  @@ -117,14 +117,20 @@
       public static final String INCLUDE_LIST = "ProxyControlGui.include_list";
       public static final String CAPTURE_HTTP_HEADERS = 
"ProxyControlGui.capture_http_headers";
        public static final String ADD_ASSERTIONS = "ProxyControlGui.add_assertion";
  -     public static final String ADD_SEPARATORS = "ProxyControlGui.add_separator";
  +     public static final String GROUPING_MODE = "ProxyControlGui.grouping_mode";
        public static final String USE_KEEPALIVE  = "ProxyControlGui.use_keepalive";
   
  +    public static final int GROUPING_NO_GROUPS = 0;
  +    public static final int GROUPING_ADD_SEPARATORS = 1;
  +    // TODO: implement these two:
  +    //public static final int GROUPING_IN_CONTROLLERS = 2;
  +    //public static final int GROUPING_STORE_FIRST_ONLY = 3;
  +
        private long lastTime = 0;//When was the last sample seen?
        private static final long sampleGap = 
            JMeterUtils.getPropDefault("proxy.pause",1000);//Detect if user has 
pressed a new link
        private boolean addAssertions;
  -     private boolean addSeparators;
  +     private int groupingMode;
        private boolean useKeepAlive;
       
       /**
  @@ -158,10 +164,10 @@
           setProperty(new BooleanProperty(CAPTURE_HTTP_HEADERS,capture));
       }
   
  -     public void setSeparators(boolean b)
  +     public void setGroupingMode(int grouping)
        {
  -             addSeparators=b;
  -             setProperty(new BooleanProperty(ADD_SEPARATORS,b));
  +             this.groupingMode= grouping;
  +             setProperty(new IntegerProperty(GROUPING_MODE,grouping));
        }
   
        public void setAssertions(boolean b)
  @@ -359,7 +365,7 @@
        private void addDivider(JMeterTreeModel model,JMeterTreeNode node)
            throws IllegalUserActionException
        {
  -             if (addSeparators){
  +             if (groupingMode == GROUPING_ADD_SEPARATORS){
                        GenericController sc = new GenericController();
                        sc.setProperty(TestElement.GUI_CLASS,
                            "org.apache.jmeter.control.gui.LogicControllerGui");
  
  
  
  1.62      +3 -1      jakarta-jmeter/xdocs/usermanual/component_reference.xml
  
  Index: component_reference.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/xdocs/usermanual/component_reference.xml,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- component_reference.xml   30 Nov 2003 23:19:25 -0000      1.61
  +++ component_reference.xml   2 Dec 2003 00:26:07 -0000       1.62
  @@ -929,6 +929,8 @@
           <property name="Port" required="Yes">The port that the Proxy Server listens 
to.  8080 is the default, but you can change it
           <!--TODO: there's some undocumented flags here -->
           <property name="Target Controller" required="Yes">The controller where the 
proxy will store the generated samples. By default, it will look for a Recording 
Controller and store them there wherever it is.</property>
  +        <property name="Grouping" required="Yes">Whether to group samplers for 
requests received without significant time separation.</property>
  +        <!-- TODO: describe all available gruping modes -->
           <property name="Patterns to Include" required="No">Regular expressions that 
are matched against the full URL that is sampled.  Allows filtering of requests that 
are recorded.  All requests pass through, but only
           those that meet the requirements of the Include/Exclude fields are 
<i>recorded</i>.  If both Include and Exclude are
           left empty, then everything is recorded (which can result in dozens of 
samples recorded for each page, as images, stylesheets,
  
  
  
  1.30      +25 -14    
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
  
  Index: ProxyControlGui.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- ProxyControlGui.java      1 Dec 2003 01:39:54 -0000       1.29
  +++ ProxyControlGui.java      2 Dec 2003 00:26:07 -0000       1.30
  @@ -126,10 +126,10 @@
       private JCheckBox httpHeaders;
   
       /**
  -     * Add separators between page requests - if there is a large enough time
  -     * difference between samples, assume that a new link has been clicked
  +     * Whether to group requests together based on inactivity separation
  +     * periods -- and how to handle such grouping afterwards.
        */
  -     private JCheckBox addSeparators;
  +     private JComboBox groupingMode;
   
        /**
         * Add an Assertion to the first sample of each set
  @@ -207,7 +207,7 @@
               setIncludeListInProxyControl(model);
               setExcludeListInProxyControl(model);
               model.setCaptureHttpHeaders(httpHeaders.isSelected());
  -                     model.setSeparators(addSeparators.isSelected());
  +                     model.setGroupingMode(groupingMode.getSelectedIndex());
                        model.setAssertions(addAssertions.isSelected());
                        model.setUseKeepAlive(useKeepAlive.isSelected());
               TreeNodeWrapper nw= (TreeNodeWrapper)targetNodes.getSelectedItem();
  @@ -262,7 +262,7 @@
           model = (ProxyControl)element;
           portField.setText(model.getPropertyAsString(ProxyControl.PORT));
                
httpHeaders.setSelected(model.getPropertyAsBoolean(ProxyControl.CAPTURE_HTTP_HEADERS));
  -             
addSeparators.setSelected(model.getPropertyAsBoolean(ProxyControl.ADD_SEPARATORS));
  +             
groupingMode.setSelectedIndex(model.getPropertyAsInt(ProxyControl.GROUPING_MODE));
                
addAssertions.setSelected(model.getPropertyAsBoolean(ProxyControl.ADD_ASSERTIONS));
                
useKeepAlive.setSelected(model.getPropertyAsBoolean(ProxyControl.USE_KEEPALIVE,true));
           
  @@ -325,7 +325,7 @@
           }
           else if ( command.equals(ProxyControl.CAPTURE_HTTP_HEADERS)
                        || command.equals(ProxyControl.ADD_ASSERTIONS)
  -                || command.equals(ProxyControl.ADD_SEPARATORS)
  +                || command.equals(ProxyControl.GROUPING_MODE)
                   || command.equals(ProxyControl.USE_KEEPALIVE)
                    )
           {
  @@ -513,12 +513,6 @@
           httpHeaders.addActionListener(this);
           httpHeaders.setActionCommand(ProxyControl.CAPTURE_HTTP_HEADERS);
   
  -             addSeparators = new 
JCheckBox(JMeterUtils.getResString("proxy_separators"));
  -             addSeparators.setName(ProxyControl.ADD_SEPARATORS);
  -             addSeparators.setSelected(false);
  -             addSeparators.addActionListener(this);
  -             addSeparators.setActionCommand(ProxyControl.ADD_SEPARATORS);
  -
                addAssertions = new 
JCheckBox(JMeterUtils.getResString("proxy_assertions"));
                addAssertions.setName(ProxyControl.ADD_ASSERTIONS);
                addAssertions.setSelected(false);
  @@ -539,7 +533,6 @@
           panel.add(httpHeaders);
   
                panel.add(useKeepAlive);
  -             panel.add(addSeparators);
                panel.add(addAssertions);
   
           return panel;
  @@ -581,6 +574,24 @@
               throw new Error(e);
           }
   
  +        DefaultComboBoxModel m= new DefaultComboBoxModel();
  +        m.addElement(JMeterUtils.getResString("grouping_no_groups"));
  +        m.addElement(JMeterUtils.getResString("grouping_add_separators"));
  +        // TODO: enable when implemented:
  +        //m.addElement(JMeterUtils.getResString("grouping_in_controllers"));
  +        //m.addElement(JMeterUtils.getResString("grouping_store_first_only"));
  +        groupingMode = new JComboBox(m);
  +        groupingMode.setName(ProxyControl.GROUPING_MODE);
  +        groupingMode.setSelectedIndex(0);
  +        groupingMode.addActionListener(this);
  +        groupingMode.setActionCommand(ProxyControl.GROUPING_MODE);
  +
  +        JLabel label2 = new JLabel(JMeterUtils.getResString("grouping_mode"));
  +        label2.setLabelFor(groupingMode);
  +        
  +        panel.add(label2);
  +        panel.add(groupingMode);
  +        
           return panel;        
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to