Package jmt.engine.dataAnalysis

Examples of jmt.engine.dataAnalysis.Measure


   */
  private void updateResponseTime(JobInfo JobInfo) {
    int c = JobInfo.getJob().getJobClass().getId();
    double ArriveTime = JobInfo.getTime();
    if (responseTimePerClass != null) {
      Measure m = responseTimePerClass[c];
      if (m != null) {
        m.update(NetSystem.getTime() - ArriveTime, 1.0);
      }
    }
    if (responseTime != null) {
      responseTime.update(NetSystem.getTime() - ArriveTime, 1.0);
    }
View Full Code Here


  private void updateUtilization(JobClass JobClass) {
    double divisor = serverNumber;

    if (utilizationPerClass != null) {
      int c = JobClass.getId();
      Measure m = utilizationPerClass[c];
      if (m != null) {
        m.update(listPerClass[c].size() / divisor, NetSystem.getTime() - getLastModifyTimePerClass(JobClass));
      }
    }
    if (utilization != null) {
      utilization.update(list.size() / divisor, NetSystem.getTime() - getLastModifyTime());
    }
View Full Code Here

  private void updateResidenceTime(JobInfo JobInfo) {
    int c = JobInfo.getJob().getJobClass().getId();
    double ArriveTime = JobInfo.getTime();
    if (residenceTimePerClass != null) {
      Measure m = residenceTimePerClass[c];
      if (m != null) {
        m.update(NetSystem.getTime() - ArriveTime, 1.0);
      }
    }
    if (residenceTime != null) {
      residenceTime.update(NetSystem.getTime() - ArriveTime, 1.0);
    }
View Full Code Here

  }

  private void updateDropRate(JobClass jobClass) {
    int c = jobClass.getId();
    if (dropRatePerClass != null) {
      Measure m = dropRatePerClass[c];
      if (m != null) {
        // Inverse measure must be used to compute drop rate
        m.update(NetSystem.getTime() - getLastJobDropTimePerClass(jobClass), 1.0);
      }
    }
    if (dropRate != null) {
      dropRate.update(NetSystem.getTime() - getLastJobDropTime(), 1.0);
    }
View Full Code Here

  }

  private void updateThroughput(Job Job) {
    int c = Job.getJobClass().getId();
    if (throughputPerClass != null) {
      Measure m = throughputPerClass[c];
      if (m != null) {
        // new sample is the inter-departures time (1/throughput)
        // Inverse measure must be used to compute throughput
        m.update(NetSystem.getTime() - getLastJobOutTimePerClass(Job.getJobClass()), 1.0);
      }
      if (DEBUG) {
        System.out.println(NetSystem.getTime() - getLastJobOutTimePerClass(Job.getJobClass()));
      }
    }
View Full Code Here

  }
 
  public void updateResponseTimePerSink(JobInfo jobInfo) {
    int c = jobInfo.getJob().getJobClass().getId();
    if (responseTimePerSinkPerClass != null) {
      Measure m = responseTimePerSinkPerClass[c];
      if (m != null) {
        m.update(NetSystem.getTime() - jobInfo.getJob().getSystemEnteringTime(), 1.0);
      }
    }
    if (responseTimePerSink != null) {
      responseTimePerSink.update(NetSystem.getTime() - jobInfo.getJob().getSystemEnteringTime(), 1.0);
    }
View Full Code Here

   * @param JobClass
   */
  private void updateQueueLength(JobClass JobClass) {
    if (queueLengthPerClass != null) {
      int c = JobClass.getId();
      Measure m = queueLengthPerClass[c];
      if (m != null) {
        m.update(listPerClass[c].size(), NetSystem.getTime() - getLastModifyTimePerClass(JobClass));
      }
    }
    if (queueLength != null) {
      queueLength.update(list.size(), NetSystem.getTime() - getLastModifyTime());
    }
View Full Code Here

  static void checkMeasures() throws jmt.common.exception.NetException {
    ListIterator<QueueNetwork> networks = networkList.listIterator();
    QueueNetwork network;
    ListIterator<Measure> measures;
    int count, num;
    Measure measure;
    while (networks.hasNext()) {
      network = networks.next();
      num = network.getMeasures().size();
      if (num > 0) {
        measures = network.getMeasures().listIterator();
        count = 0;

        while (measures.hasNext()) {
          measure = measures.next();
          if (measure.hasFinished()) {
            count++;
          }
        }

        switch (network.getBehaviour()) {
View Full Code Here

      throw new NetException("Can't measure progress of a network which does not exist.");
    }
    // We extimate on the slowest not completed measure
    ListIterator<Measure> measures;
    double slowest = 1;
    Measure measure;
    measures = network.getMeasures().listIterator();
    while (measures.hasNext()) {
      measure = measures.next();
      if (!measure.hasFinished()) {
        // find slowest measure
        if (measure.getSamplesAnalyzedPercentage() < slowest) {
          slowest = measure.getSamplesAnalyzedPercentage();
        }
      }
    }
    return slowest;
  }
View Full Code Here

      throw new NetException("Can't get measures of a network which does not exist.");
    }

    ListIterator<Measure> measures;
    int count = 0;
    Measure measure;
    int num = network.getMeasures().size();

    if (num > 0) {
      measures = network.getMeasures().listIterator();
      while (measures.hasNext()) {
        measure = measures.next();
        //count finished measures
        if (measure.hasFinished()) {
          count++;
        } else {
        }
      }
    }
View Full Code Here

TOP

Related Classes of jmt.engine.dataAnalysis.Measure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.