jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <p.moua...@ubik-ingenierie.com>
Subject Re: Precise Throughput Timer and rampup
Date Sat, 25 Apr 2020 19:49:51 GMT
No , little doubt but no bug I see at least

On Sat, Apr 25, 2020 at 9:49 PM Philippe Mouawad <
p.mouawad@ubik-ingenierie.com> wrote:

> There's a bug in my code, double checking
>
> On Sat, Apr 25, 2020 at 9:40 PM Philippe Mouawad <
> p.mouawad@ubik-ingenierie.com> wrote:
>
>> Hello,
>>
>> When you use Precise Throughput Timer how do you proceed to do this:
>>
>>    - X req/h in first hour
>>    - 2X req/h in second hour
>>    - 3X req/h in third hour
>>
>>
>> I thought one way was to have a JSR223 PreProcessor like this:
>> ------------------------------------------------------------------------
>> long startTime = vars["START.MS"].toLong();
>> long now = System.currentTimeMillis();
>> long diff = now -startTime;
>> if (diff >= 120000) {
>>    vars.put("THROUGHPUT", "3000");
>> } else if (diff >= 60000) {
>>    vars.put("THROUGHPUT", "2000");
>> } else {
>>     vars.put("THROUGHPUT", "1000");
>> }
>> ------------------------------------------------------------------------
>>
>> But it does not seem to work.
>>
>> Vladimir, since you're the creator of this, how do you proceed in this
>> case ?
>> Maybe there is room for improvement/simplification ?
>>
>> --
>> Cordialement
>> Philippe M.
>> Ubik-Ingenierie
>>
>>
>>
>>
>
> --
> Cordialement
> Philippe M.
> Ubik-Ingenierie
>


-- 
Cordialement
Philippe M.
Ubik-Ingenierie

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message