jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From D G <dmwmailingl...@gmail.com>
Subject Re: new __Time function
Date Fri, 15 Jun 2012 08:13:35 GMT
This all started as 'now + n days', so the __timeAdd methods works on
a now + something manner.

New proposal:
__timeAdd(format, number*, m|h|d|w|M|y**, parseString, parseFormat, variable)
where parseString is the string to be parsed into a date object and
ParseFormat is the format of the string to be parsed.

My criticism would be the growing number of (optional) parameters but
it's too easy to lose __Functions somewhere in a test. Don't like
using two functions to accomplish a task :)
Another would be requiring some knowledge of how Java parses data.
Though that should be reasonably trivial to learn for most strings.

Also, it would be quite easy to allow parseString to accept a
float/epoch time and work with that.

Thoughts?

Regards,
Daniel

On Thu, Jun 14, 2012 at 10:53 PM, sebb <sebbaz@gmail.com> wrote:
> On 14 June 2012 21:38, Philippe Mouawad <philippe.mouawad@gmail.com> wrote:
>> Hello,
>> I prefer:
>> __timeAdd(format, number*, m|h|d|w|M|y**, variable)
>> * can be negative
>> ** applied to number, ie +/- 1 minute, hour, day, week, month or year.
>> Only one option is possible.
>
> What about the base time?
>
> The current proposal would only allow the user to adjust the current time.
> Each time it is invoked the base time may vary.
>
> Is there any need to apply the calculation to a pre-defined time, e.g.
> one extracted from a sampler response?
>
> Or perhaps to call __time() to set up a variable, and then use
> __timeAdd() to create various different times from it?
>
> If we are going to add a time calculator function, it should be as
> versatile as possible, without being too complicated to use or
> implement.
>
>> Regards
>> Philippe M.
>>
>> On Wed, Jun 13, 2012 at 2:11 PM, D G <dmwmailinglist@gmail.com> wrote:
>>
>>> For full context see here:
>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=53362
>>>
>>> Needed a __time function with the ability to add n days before
>>> returning a date string so I created one.
>>>
>>> I'd happily create a new function or append the current one. Would
>>> users prefer a
>>>
>>> __time(format, variable, +/-Days) (reordered for compatebility)
>>>
>>> where Days is the amount of days to add or subtract before returning a
>>> formatted string.
>>>
>>> or a new function?
>>>
>>> proposal:
>>>
>>> __timeMath(format, number, m|h|d|w|M|y**, variable)
>>>
>>> ** applied to number, ie +/- 1 minute, hour, day, week, month or year.
>>> Only one option is possible.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>>
>>>
>>
>>
>> --
>> Cordialement.
>> Philippe Mouawad.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message