On Tue, Sep 6, 2016 at 6:01 PM, sebb <seb...@gmail.com> wrote: > On 3 September 2016 at 14:05, Philippe Mouawad > <philippe.moua...@gmail.com> wrote: > > Hi sebb, > > It has no relation with timers. > > OK, my bad; disabling the test element would not help. > No problem.
> > > Please read the code and my bugzilla. > > However, I still think the proposed change should have been discussed > first. > These days and for a while now, I am very frustrated to see very long discussions without any further development even when we reach an agreement: - CSV random , big discussion+agreement , 0 commit - HTTP2 , no progress - DSL , big discussion, 0 commit - Timer factor , big discussion , 0 commit - Caching with Guava, big discussion, patch refusal, 0 progress - ... Sometimes we discuss without a code basis which can last long time, lead to errors in understanding . Our project stats show that we are below other projects in terms of commits and at the same level in terms of discussion, I don't think it's good I am ok to discuss and I try to as much as I can do, but I would be very frustrated that for any feature I think about, I would need agreement from all team. As a user (big user) of JMeter and being in contact with other big users of JMeter, I thought this feature was useful, I confirmed it during a testing campaign where I had to use TPC at high rate, I thought that it would help everybody. So I implemented it and commited it. Isn't this a commiter privilege ? As an active commiter I think I have this right, and clearly for me, discussion is good, development is better :-) Also, IMO, opinions on a project dev mailing list should have a weight proportional to work on project , ie commits (more on Feature/Bugfix/Doc than on checkstyle formatting)+Release management done on the project in the last year of discussion. > 1) is it a sensible addition to the code? > I think it is. I explained above why. Without this feature I would have lost a huge amount of time changing percentage and possibly forgot to revert it. > 2) if so, what is the best way to implement the functionality? > > In particular, does it make sense to have a separate property for this > function? > If so, why is the TreeCloner unconditionally changed to > ComponentTreeClonerForValidation even if that does nothing? > Due to modules access > Surely the new class should only be invoked if necessary? > See above > > Would it not be better to enhance TreeClonerForValidation instead of > creating another class? > It's not possible due to modules (APacheJMeter_core != ApacheJMeter_components) . > > Or just unconditionally change the percentage if in validation mode? > In validation mode you might need the 2 modes. > > What about unit tests? > You're welcome to contribute it. I thoroughly tested it without JUnit and didn't have time to do Junit. > > Regards > > > > On Saturday, September 3, 2016, sebb <seb...@gmail.com> wrote: > > > >> I think this is a bad idea. > >> > >> It's unnecessary code to achieve what can already be done by disabling > >> the timer. > >> > >> Please don't make changes like this before discussing them first. > >> > >> On 3 September 2016 at 10:24, <pmoua...@apache.org <javascript:;>> > wrote: > >> > Author: pmouawad > >> > Date: Sat Sep 3 09:24:08 2016 > >> > New Revision: 1759062 > >> > > >> > URL: http://svn.apache.org/viewvc?rev=1759062&view=rev > >> > Log: > >> > Bug 60082 - Validation mode : Be able to force Throughput Controller > to > >> run as if it was set to 100% > >> > Bugzilla Id: 60082 > >> > > >> > Added: > >> > jmeter/trunk/src/components/org/apache/jmeter/validation/ > >> > jmeter/trunk/src/components/org/apache/jmeter/validation/ > >> ComponentTreeClonerForValidation.java (with props) > >> > Modified: > >> > jmeter/trunk/bin/jmeter.properties > >> > jmeter/trunk/src/core/org/apache/jmeter/gui/action/Start.java > >> > jmeter/trunk/xdocs/changes.xml > >> > jmeter/trunk/xdocs/usermanual/component_reference.xml > >> > > >> > Modified: jmeter/trunk/bin/jmeter.properties > >> > URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter. > >> properties?rev=1759062&r1=1759061&r2=1759062&view=diff > >> > ============================================================ > >> ================== > >> > --- jmeter/trunk/bin/jmeter.properties (original) > >> > +++ jmeter/trunk/bin/jmeter.properties Sat Sep 3 09:24:08 2016 > >> > @@ -1232,7 +1232,7 @@ system.properties=system.properties > >> > # It runs validation without timers, with 1 thread, 1 iteration and > >> Startup Delay set to 0 > >> > # You can implement your own policy that must extend > >> org.apache.jmeter.engine.TreeCloner > >> > # JMeter will instantiate it and use it to create the Tree used to > run > >> validation on Thread Group > >> > -#testplan_validation.tree_cloner_class=org.apache. > >> jmeter.gui.action.validation.TreeClonerForValidation > >> > +#testplan_validation.tree_cloner_class=org.apache.jmeter.validation. > >> ComponentTreeClonerForValidation > >> > > >> > # Number of threads to use to validate a Thread Group > >> > #testplan_validation.nb_threads_per_thread_group=1 > >> > @@ -1242,3 +1242,7 @@ system.properties=system.properties > >> > > >> > # Number of iterations to use to validate a Thread Group > >> > #testplan_validation.number_iterations=1 > >> > + > >> > +# Force throuput controllers that work in percentage mode to be a > 100% > >> > +# Disabled by default > >> > +#testplan_validation.tpc_force_100_pct=false > >> > \ No newline at end of file > >> > > >> > Added: jmeter/trunk/src/components/org/apache/jmeter/validation/ > >> ComponentTreeClonerForValidation.java > >> > URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/ > >> org/apache/jmeter/validation/ComponentTreeClonerForValidati > >> on.java?rev=1759062&view=auto > >> > ============================================================ > >> ================== > >> > --- jmeter/trunk/src/components/org/apache/jmeter/validation/ > >> ComponentTreeClonerForValidation.java (added) > >> > +++ jmeter/trunk/src/components/org/apache/jmeter/validation/ > >> ComponentTreeClonerForValidation.java Sat Sep 3 09:24:08 2016 > >> > @@ -0,0 +1,58 @@ > >> > +/* > >> > + * Licensed to the Apache Software Foundation (ASF) under one or more > >> > + * contributor license agreements. See the NOTICE file distributed > with > >> > + * this work for additional information regarding copyright > ownership. > >> > + * The ASF licenses this file to You under the Apache License, > Version > >> 2.0 > >> > + * (the "License"); you may not use this file except in compliance > with > >> > + * the License. You may obtain a copy of the License at > >> > + * > >> > + * http://www.apache.org/licenses/LICENSE-2.0 > >> > + * > >> > + * Unless required by applicable law or agreed to in writing, > software > >> > + * distributed under the License is distributed on an "AS IS" BASIS, > >> > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or > >> implied. > >> > + * See the License for the specific language governing permissions > and > >> > + * limitations under the License. > >> > + * > >> > + */ > >> > + > >> > +package org.apache.jmeter.validation; > >> > + > >> > +import org.apache.jmeter.control.ThroughputController; > >> > +import org.apache.jmeter.gui.action.validation.TreeClonerForValidat > ion; > >> > +import org.apache.jmeter.util.JMeterUtils; > >> > + > >> > +/** > >> > + * Clones the test tree, modifying throughput controller percentage > >> > + * @since 3.1 > >> > + */ > >> > +public class ComponentTreeClonerForValidation extends > >> TreeClonerForValidation { > >> > + > >> > + /** > >> > + * For 100% on ThroughputController > >> > + */ > >> > + protected static final boolean VALIDATION_TPC_FORCE_100_PERCENT > = > >> JMeterUtils.getPropDefault("testplan_validation.tpc_force_100_pct", > >> false); //$NON-NLS-1$ > >> > + > >> > + public ComponentTreeClonerForValidation() { > >> > + this(false); > >> > + } > >> > + > >> > + public ComponentTreeClonerForValidation(boolean > >> honourNoThreadClone) { > >> > + super(honourNoThreadClone); > >> > + } > >> > + > >> > + /** > >> > + * @see org.apache.jmeter.engine.TreeCloner#addNodeToTree(java. > >> lang.Object) > >> > + */ > >> > + @Override > >> > + protected Object addNodeToTree(Object node) { > >> > + Object clonedNode = super.addNodeToTree(node); > >> > + if (VALIDATION_TPC_FORCE_100_PERCENT && clonedNode > instanceof > >> ThroughputController) { > >> > + ThroughputController tc = (ThroughputController) > clonedNode; > >> > + if(tc.getStyle() == ThroughputController.BYPERCENT) { > >> > + tc.setPercentThroughput(100); > >> > + } > >> > + } > >> > + return clonedNode; > >> > + } > >> > +} > >> > > >> > Propchange: jmeter/trunk/src/components/org/apache/jmeter/validation/ > >> ComponentTreeClonerForValidation.java > >> > ------------------------------------------------------------ > >> ------------------ > >> > svn:mime-type = text/plain > >> > > >> > Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/Start. > java > >> > URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/ > >> apache/jmeter/gui/action/Start.java?rev=1759062&r1= > >> 1759061&r2=1759062&view=diff > >> > ============================================================ > >> ================== > >> > --- jmeter/trunk/src/core/org/apache/jmeter/gui/action/Start.java > >> (original) > >> > +++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/Start.java Sat > >> Sep 3 09:24:08 2016 > >> > @@ -71,7 +71,7 @@ public class Start extends AbstractActio > >> > */ > >> > private static final String CLONER_FOR_VALIDATION_CLASS_NAME = > >> > JMeterUtils.getPropDefault(VAL > IDATION_CLONER_CLASS_PROPERTY_NAME, > >> //$NON-NLS-1$ > >> > - TreeClonerForValidation.class.getName()); > >> > + "org.apache.jmeter.validation. > >> ComponentTreeClonerForValidation"); > >> > > >> > static { > >> > commands.add(ActionNames.ACTION_START); > >> > > >> > Modified: jmeter/trunk/xdocs/changes.xml > >> > URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes. > >> xml?rev=1759062&r1=1759061&r2=1759062&view=diff > >> > ============================================================ > >> ================== > >> > --- jmeter/trunk/xdocs/changes.xml [utf-8] (original) > >> > +++ jmeter/trunk/xdocs/changes.xml [utf-8] Sat Sep 3 09:24:08 2016 > >> > @@ -94,6 +94,7 @@ Summary > >> > <ul> > >> > <li><bug>59351</bug>Improve log/error/message for > >> IncludeController. Partly contributed by Antonio Gomes Rodrigues > (ra0077 at > >> gmail.com)</li> > >> > <li><bug>60023</bug>ThroughputController : Make "Percent > >> Executions" and global the default values. Contributed by Ubik Load Pack > >> (support at ubikloadpack.com)</li> > >> > + <li><bug>60082</bug>Validation mode : Be able to force Throughput > >> Controller to run as if it was set to 100%</li> > >> > </ul> > >> > > >> > <h3>Listeners</h3> > >> > > >> > Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml > >> > URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/ > >> component_reference.xml?rev=1759062&r1=1759061&r2=1759062&view=diff > >> > ============================================================ > >> ================== > >> > --- jmeter/trunk/xdocs/usermanual/component_reference.xml (original) > >> > +++ jmeter/trunk/xdocs/usermanual/component_reference.xml Sat Sep 3 > >> 09:24:08 2016 > >> > @@ -6171,11 +6171,12 @@ Since JMeter 3.0, you can run a selectio > >> > > >> > <b>Validation Mode:</b><br></br> > >> > This mode enables rapid validation of a Thread Group by running it > with > >> 1 thread, 1 iteration, no timers and no <code>Startup delay</code> set > to 0. > >> > -The 3 first properties can be modified by setting in user.properties: > >> > +Behaviour can be modified with some properties by setting in > >> user.properties: > >> > <ul> > >> > <li><code>testplan_validation.nb_threads_per_thread_group</code> : > >> Number of threads to use to validate a Thread Group, by default 1</li> > >> > <li><code>testplan_validation.ignore_timers</code> : Ignore timers > >> when validating the thread group of plan, by default 1</li> > >> > <li><code>testplan_validation.number_iterations</code> : Number of > >> iterations to use to validate a Thread Group</li> > >> > +<li><code>testplan_validation.tpc_force_100_pct</code> : Wether to > >> force Throughput Controller in percentage mode to run as if percentage > was > >> 100%. Defaults to false</li> > >> > </ul> > >> > </p> > >> > > >> > > >> > > >> > > > > > > -- > > Cordialement. > > Philippe Mouawad. > -- Cordialement. Philippe Mouawad.