There's a bug in my code, double checking
On Sat, Apr 25, 2020 at 9:40 PM Philippe Mouawad <
[email protected]> 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