Package com.linkedin.common.stats

Examples of com.linkedin.common.stats.LongStats


      _concurrentMax = 0;

      _outstandingStartTimeAvg = 0;
      _outstandingCount = 0;

      _callTimeStats = new LongStats();
      _errorTypeCounts = Collections.emptyMap();
      _errorTypeCountsTotal = Collections.emptyMap();
    }
View Full Code Here


    }

    @Override
    public String toString()
    {
      LongStats callTimeStats = this.getCallTimeStats();
      return
        (
          "EndTime=" + this.getIntervalEndTime() +
          ", Interval=" + this.getInterval() +
          ", CallCount=" + this.getCallCount() +
          ", CallCountTotal=" + this.getCallCountTotal() +
              ", CallStartCountTotal=" + this.getCallStartCountTotal() +
          ", CallsPerSecond=" + this.getCallsPerSecond() +
          ", ErrorCount=" + this.getErrorCount() +
          ", ErrorCountTotal=" + this.getErrorCountTotal() +
          ", ErrorRate=" + this.getErrorRate() +
          ", ConcurrentMax=" + this.getConcurrentMax() +
          ", OutstandingStartTimeAvg=" + this.getOutstandingStartTimeAvg() +
              ", OutstandingCount=" + this.getOutstandingCount() +
          ", CallTimeAvg=" + callTimeStats.getAverage() +
              ", CallTimeStdDev=" + callTimeStats.getStandardDeviation() +
          ", CallTimeMin=" + callTimeStats.getMinimum() +
          ", CallTimeMax=" + callTimeStats.getMaximum() +
          ", CallTime50Pct=" + callTimeStats.get50Pct() +
          ", CallTime90Pct=" + callTimeStats.get90Pct() +
          ", CallTime95Pct=" + callTimeStats.get95Pct() +
          ", CallTime99Pct=" + callTimeStats.get99Pct() +
          ", ErrorTypeCounts=" + this.getErrorTypeCounts() +
          ", ErrorTypeCountsTotal=" + this.getErrorTypeCountsTotal()
        );
    }
View Full Code Here

  }

  public void run()
  {
    final Stats stats = _statsRef.get();
    LongStats snapshot = stats.getLatencyStats();
    long elapsedTime = stats.getElapsedTime();
    double timePerReq = stats.getSuccessCount() != 0 ? elapsedTime/(double)stats.getSuccessCount() : 0;
    double reqPerSec = timePerReq != 0 ? 1000.0 / timePerReq : 0;

    System.out.println();
    System.out.println();
    System.out.println("DONE");
    System.out.println();
    System.out.println("Results");
    System.out.println("-------");
    System.out.println("    Total Requests: " + stats.getSentCount());
    System.out.println("    Elapsed: " + elapsedTime);
    System.out.println("    Mean latency (in millis): " + snapshot.getAverage());
    System.out.println("    Reqs / Sec: " + reqPerSec);
    System.out.println("    Errors: " + stats.getErrorCount());
    System.out.println("    Min latency: " + snapshot.getMinimum());
    System.out.println("    50% latency: " + snapshot.get50Pct());
    System.out.println("    90% latency: " + snapshot.get90Pct());
    System.out.println("    95% latency: " + snapshot.get95Pct());
    System.out.println("    99% latency: " + snapshot.get99Pct());
    System.out.println("    Max latency: " + snapshot.getMaximum());
  }
View Full Code Here

  @Override
  public PoolStats.LifecycleStats getStats()
  {
    synchronized (_createTimeTracker)
    {
      LongStats stats = _createTimeTracker.getStats();
      _createTimeTracker.reset();
      return new AsyncPoolLifecycleStats(stats.getAverage(),
                                         stats.get50Pct(),
                                         stats.get95Pct(),
                                         stats.get99Pct());
    }
  }
View Full Code Here

  public AsyncPoolStats getStats()
  {
    // get a copy of the stats
    synchronized (_lock)
    {
      LongStats waitTimeStats = _waitTimeTracker.getStats();
      PoolStats.LifecycleStats lifecycleStats = _lifecycle.getStats();
      AsyncPoolStats stats = new AsyncPoolStats(
        _totalCreated,
        _totalDestroyed,
        _totalCreateErrors,
        _totalDestroyErrors,
        _totalBadDestroyed,
        _totalTimedOut,
        _checkedOut,
        _maxSize,
        _minSize,
        _poolSize,
        _sampleMaxCheckedOut,
        _sampleMaxPoolSize,
        _idle.size(),
        waitTimeStats.getAverage(),
        waitTimeStats.get50Pct(),
        waitTimeStats.get95Pct(),
        waitTimeStats.get99Pct(),
        lifecycleStats
      );
      _sampleMaxCheckedOut = _checkedOut;
      _sampleMaxPoolSize = _poolSize;
      _waitTimeTracker.reset();
View Full Code Here

TOP

Related Classes of com.linkedin.common.stats.LongStats

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.