Gets the 90-th percentile in the total amount of time spent handling a request, in milliseconds.
961943
@Monitor(name = "ResponseTimeMillis90Percentile", type = DataSourceType.INFORMATIONAL,
             description = "90th percentile in total time to handle a request, in milliseconds")
    public double getResponseTime90thPercentile() {
        return getResponseTimePercentile(Percent.NINETY);
    }
1142403
def get_latency_average_percentile(self):
        
        (_, _, time_interval) = self.recurrent_works[21]
        last_time = time.time() - time_interval
        latencies = [s.latency for s in self.services if s.last_chk > last_time]
        lat_avg, lat_min, lat_max = average_percentile(latencies)
        if lat_avg is not None:
            self.stats['latency']['avg'] = lat_avg
            self.stats['latency']['min'] = lat_min
            self.stats['latency']['max'] = lat_max
            logger.debug("Latency (avg/min/max): %.2f/%.2f/%.2f", lat_avg, lat_min, lat_max)
901127
public int millisecondsToX(long milliseconds) {
        if (autoScroll.get()) {
            int playHead = (getWidth() / 2) + 2;
            long offset = milliseconds - getFurthestPlaybackPosition();
            return playHead + (Util.timeToHalfFrame(offset) / scale.get());
        }
        return Util.timeToHalfFrame(milliseconds) / scale.get();
    }
326550
private Number getStat(StatList stat) {
        LocalDateTime now = this.clock.now();
        if (now.minusSeconds(this.expiryInterval).isAfter(this.responseDate)) {
            this.responseDate = now;
            this.cachedResponse = commandExecutor.sendCommand(serverProperties.getStats());
        }

        for (String line : cachedResponse) {
            if (line.startsWith(stat.getStatPrefix())) {
                try {
                    return (NumberFormat.getInstance()).parse(line.substring(stat.getStatPrefix().length()).trim());
                } catch (ParseException e) {
                    LOGGER.warn("Could not parse server statistic", e);
                    return 0;
                }
            }
        }

        return 0;
    }
990731
@Monitor(name = "ResponseTimePercentileWhen", type = DataSourceType.INFORMATIONAL,
             description = "The time the percentile values were computed")
    public String getResponseTimePercentileTime() {
        return dataDist.getTimestamp();
    }
144221
def total_time(self):
        """"""
        now_playing = self._setstate.nowPlayingInfo
        if now_playing.HasField('duration'):
            return int(now_playing.duration)

        return None
504535
synchronized float getAverageWaitMsecsPerHardAdmissionJob() {
    float averageWaitMsecsPerHardAdmissionJob = -1f;
    if (!hardAdmissionMillisQueue.isEmpty()) {
      long totalWait = 0;
      for (Long waitMillis : hardAdmissionMillisQueue) {
        totalWait += waitMillis;
      }
      averageWaitMsecsPerHardAdmissionJob =
        ((float) totalWait) / hardAdmissionMillisQueue.size();
    }
    return averageWaitMsecsPerHardAdmissionJob;
  }
779449
def report

      percent = @current.to_f/ @max.to_f
      percent = 0.001 if percent < 0.001
      if @desc != ""
        indicator = @desc + ": "
      else
        indicator = "Progress "
      end
      indicator += "["
      10.times{|i|
        if i < percent * 10 then
          indicator += "."
        else
          indicator += " "
        end
      }
      indicator += "]   done #{(percent * 100).to_i}% "

      eta =  (Time.now - @time)/percent * (1-percent)
      eta = eta.to_i
      eta = [eta/3600, eta/60 % 60, eta % 60].map{|t| "%02i" % t }.join(':')

      used = (Time.now - @time).to_i
      used = [used/3600, used/60 % 60, used % 60].map{|t|  "%02i" % t }.join(':')

      indicator += " (Time left #{eta} seconds) (Started #{used} seconds ago)"

      STDERR.print("\033[#{@depth + 1}F\033[2K" + indicator + "\n\033[#{@depth + 2}E")
    end
652569
public Double getSurvivalTimePercentile(String group, double percentile) {

		StrataInfo si = sfi.getStrataInfoHashMap().get(group);
		ArrayList<Double> percentage = si.getSurv();
		Integer percentileIndex = null;
		for (int i = 0; i < percentage.size(); i++) {
			if (percentage.get(i) == percentile) {
				if (i + 1 < percentage.size()) {
					percentileIndex = i + 1;
				}
				break;
			} else if (percentage.get(i) < percentile) {
				percentileIndex = i;
				break;
			}
		}
		if (percentileIndex != null) {
			return si.getTime().get(percentileIndex);
		} else {
			return null;
		}
	}
1022015
private long getWaitTimeMs(TestContext context) {
        if (StringUtils.hasText(seconds)) {
            return Long.valueOf(context.replaceDynamicContentInString(seconds)) * 1000;
        } else {
            return Long.valueOf(context.replaceDynamicContentInString(milliseconds));
        }
    }
1353820
def getUptime(self):
        
        try:
            fp = open(uptimeFile, 'r')
            line = fp.readline()
            fp.close()
        except:
            raise IOError('Failed reading stats from file: %s' % uptimeFile)
        return float(line.split()[0])
1090060
public long getElapsedTicks() {
		long elapsed;
		if (running) {
			elapsed = (System.nanoTime() - startTime);
		} else {
			elapsed = (stopTime - startTime);
		}
		return elapsed / nsPerTick;
	}
137177
@Deprecated
    public double getRecentHitRate()
    {
        long r = requests.count();
        long h = hits.count();
        try
        {
            return ((double)(h - lastHits.get())) / (r - lastRequests.get());
        }
        finally
        {
            lastRequests.set(r);
            lastHits.set(h);
        }
    }
33858
def cmd_average_response_time(self):
        """"""
        average = [
            line.time_wait_response
            for line in self._valid_lines
            if line.time_wait_response >= 0
        ]

        divisor = float(len(average))
        if divisor > 0:
            return sum(average) / float(len(average))
        return 0
68439
def get_stats(self, request, context):
        """"""
        _log_request(request, context)
        m = self.listener.memory
        return clearly_pb2.StatsMessage(
            task_count=m.task_count,
            event_count=m.event_count,
            len_tasks=len(m.tasks),
            len_workers=len(m.workers)
        )
268900
@Override
    public String getMinPollingTime() {
        return systemSecurityContext.runAsSystem(() -> tenantConfigurationManagement
                .getConfigurationValue(TenantConfigurationKey.MIN_POLLING_TIME_INTERVAL, String.class).getValue());
    }
1098293
public double percentile(double p) {
    long[] counts = new long[PercentileBuckets.length()];
    for (int i = 0; i < counts.length; ++i) {
      counts[i] = counterFor(i).count();
    }
    return PercentileBuckets.percentile(counts, p);
  }