japex
  1. japex
  2. JAPEX-17

Japex should support a configurable delay between iterations

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: engine
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      17

      Description

      Adding a parameter such as japex.runDelay can be useful to simulate certain multi-user CMS systems.
      Although it is possible to add a delay to a driver, it is difficult since the elapsed time of the run()
      method is controlled by the Japex engine.

      Vitaliy proposed the following extension:

      if (tc.hasParam(Constants.RUN_TIME)) {
      startTime = Util.currentTimeMillis();
      long runDelay = tc.hasParam("japex.runDelay")? tc.getLongParam("japex.runDelay "):0L;
      System.out.println("\n[run] will sleep : " + runDelay + "ms");
      // Run phase
      do {
      if (runDelay > 0){
      try

      { Thread.sleep(runDelay); }

      catch (Exception e)

      { e.printStackTrace(); }

      }
      run(tc); // Call run
      runIterations++;
      millis = Util.currentTimeMillis();
      System.out.println("[run] ... " );
      excludeTime = runIterations*runDelay;
      } while ((_endTime + excludeTime) >= (millis));

      duration = millis - startTime - excludeTime;
      }

        Activity

        Hide
        Santiago Pericas-Geertsen added a comment -

        Added new parameter japex.runIterationDelay. See Japex manual for further details.

        Show
        Santiago Pericas-Geertsen added a comment - Added new parameter japex.runIterationDelay. See Japex manual for further details.

          People

          • Assignee:
            Santiago Pericas-Geertsen
            Reporter:
            Santiago Pericas-Geertsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: