Esempio n. 1
0
  public String statString() {
    long timetotal = 0;

    if (_timestart != 0) {
      timetotal = System.currentTimeMillis() - _timestart;
    }

    return ("elapsedtime="
        + timetotal
        + "; rate="
        + HCUtil.megabytesPerSecond(timetotal, _bytesMoved)
        + " "
        + HCUtil.gigsPerDay(timetotal, _bytesMoved));
  }
Esempio n. 2
0
  public Metric[] getCurrentMetrics() {
    long timetotal = 0;
    if (_timestart != 0) {
      timetotal = System.currentTimeMillis() - _timestart;
    }

    Metric metrics[] = new Metric[6];
    metrics[0] = new Metric("TotalCalls", "calls", _totalcalls);
    metrics[1] = new Metric("BytesMoved", "bytes", _bytesMoved);
    metrics[2] = new Metric("BytesRemaining", "bytes", _size - _bytesMoved);
    metrics[3] =
        new Metric(
            "RateMegabytesPerSecond", "MB/sec", HCUtil.megabytesPerSecond(timetotal, _bytesMoved));
    metrics[4] =
        new Metric("RateGigabytesPerSecond", "GB/sec", HCUtil.gigsPerDay(timetotal, _bytesMoved));
    metrics[5] = new Metric("ElapsedTime", "milliseconds", timetotal);

    return (metrics);
  }