Format a list of thread statistics
@param stats The thread statistics list to format
@return A ChannelBuffer object to pass on to the caller
@throws BadRequestException if the plugin has not implemented this method
@since 2.2
170608
public ChannelBuffer formatThreadStatsV1(final List<Map<String, Object>> stats) {
    throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, 
        "The requested API endpoint has not been implemented", 
        this.getClass().getCanonicalName() + 
        " has not implemented formatThreadStatsV1");
  }
683354
private ByteBuf writeRequest(ByteBuf buffer, Object request, ThreadContext context) {
    context.serializer().writeObject(request, OUTPUT.get().setByteBuf(buffer));
    if (request instanceof ReferenceCounted) {
      ((ReferenceCounted) request).release();
    }
    return buffer;
  }
1241226
function statsMethod (query = {}) {
    const reqParams = Object.assign({}, defaults, query);

    debug("stats request", endpoint.url, reqParams);
    return transport(endpoint.url, reqParams).then(function (response) {
      if (response == null) return;

      // response is something like "GameID is required"
      if (typeof response === "string") throw new Error(response);

      return transform ? transform(response) : response;
    });
  }
1284139
public static crvserver_stats[] get(nitro_service service) throws Exception{
		crvserver_stats obj = new crvserver_stats();
		crvserver_stats[] response = (crvserver_stats[])obj.stat_resources(service);
		return response;
	}
39097
public GetMediaStatisticResponse getMediaStatistic(GetMediaStatisticRequest request) {
        checkIsTrue(request.getMediaId() != null, "mediaId is null!");

        InternalRequest internalRequest =
                createRequest(HttpMethodName.GET, request, MEDIA_STATISTIC, request.getMediaId());
        if (request.getStartTime() != null) {
            internalRequest.addParameter(START_TIME,
                    DateUtils.formatAlternateIso8601Date(request.getStartTime()));
        }
        if (request.getEndTime() != null) {
            internalRequest.addParameter(END_TIME,
                    DateUtils.formatAlternateIso8601Date(request.getEndTime()));
        }
        internalRequest.addParameter(AGGREGATE, String.valueOf(request.isAggregate()));
        return invokeHttpClient(internalRequest, GetMediaStatisticResponse.class);
    }
918834
@Override
    protected CacheStatistics[] getStatistics() {
        val statsList = new ArrayList<CacheStatistics>();
        try {
            val client = getClientFromPool();
            client.getStats()
                .forEach((key, statsMap) -> {
                    if (!statsMap.isEmpty()) {
                        val size = Long.parseLong(statsMap.get("bytes"));
                        val capacity = Long.parseLong(statsMap.get("limit_maxbytes"));
                        val evictions = Long.parseLong(statsMap.get("evictions"));

                        val name = key instanceof InetSocketAddress
                            ? ((InetSocketAddress) key).getHostName()
                            : key.toString();
                        statsList.add(new SimpleCacheStatistics(size, capacity, evictions, name));
                    }
                });
        } catch (final Exception e) {
            LOGGER.error(e.getMessage(), e);
        }

        return statsList.toArray(CacheStatistics[]::new);
    }
116646
public ChannelBuffer formatAggregatorsV1(final Set<String> aggregators) {
    throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, 
        "The requested API endpoint has not been implemented", 
        this.getClass().getCanonicalName() + 
        " has not implemented formatAggregatorsV1");
  }
393640
public ArrayList<OvhChartSerie<OvhChartTimestampValue>> serviceName_statistics_GET(String serviceName, OvhStatisticsPeriodEnum period, OvhStatisticsTypeEnum type) throws IOException {
		String qPath = "/hosting/web/{serviceName}/statistics";
		StringBuilder sb = path(qPath, serviceName);
		query(sb, "period", period);
		query(sb, "type", type);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t6);
	}
233217
public GetSessionStatisticsResponse getSessionStatistics(GetSessionStatisticsRequest request) {
        checkNotNull(request, "The parameter request should NOT be null.");
        checkStringNotEmpty(request.getSessionId(), "The parameter sessionId should NOT be null or empty string.");
        InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, STATISTICS, LIVE_SESSION,
                request.getSessionId());
        if (request.getStartDate() != null) {
            internalRequest.addParameter("startDate", request.getStartDate());
        }
        if (request.getEndDate() != null) {
            internalRequest.addParameter("endDate", request.getEndDate());
        }
        if (request.getAggregate() != null) {
            internalRequest.addParameter("aggregate", request.getAggregate().toString());
        }
        return invokeHttpClient(internalRequest, GetSessionStatisticsResponse.class);
    }
1317519
public static StatisticsDeviceListResult statisticsDeviceList(
            String accessToken, StatisticsDeviceList statisticsDeviceList) {
        return statisticsDeviceList(accessToken,
                JsonUtil.toJSONString(statisticsDeviceList));
    }
173559
@Benchmark
  public void createCallLatency(OutputStreamWriter results) throws Exception {
    results.write(new MeanDevAccumulator().addResults(new TimedCallable() {
      private int i = 0;

      @Override
      public void callTimed() throws Exception {
        proxyTClientProxyProtocol.create(new CreateRequest(metaInfo, ROOT + "newfilea-" + i++,
            metaInfo.getOrigCaller().getUserName(), FsPermission.getDefault(), true, true,
            (short) 1, 1024));
      }
    }, WARMUP_SAMPLES, MEASURED_SAMPLES).report());
    results.write("  |  ");

    results.write(new MeanDevAccumulator().addResults(new TimedCallable() {
      private int i = 0;

      @Override
      public void callTimed() throws Exception {
        proxyClientProxyProtocol.create(new CreateRequest(metaInfo, ROOT + "newfileb-" + i++,
            metaInfo.getOrigCaller().getUserName(), FsPermission.getDefault(), true, true,
            (short) 1, 1024));
      }
    }, WARMUP_SAMPLES, MEASURED_SAMPLES).report());
    results.write("  |  ");

    results.write(new MeanDevAccumulator().addResults(new TimedCallable() {
      private int i = 0;

      @Override
      public void callTimed() throws Exception {
        directClientProxyProtocol.create(new CreateRequest(metaInfo, ROOT + "newfilec-" + i++,
            metaInfo.getOrigCaller().getUserName(), FsPermission.getDefault(), true, true,
            (short) 1, 1024));
      }
    }, WARMUP_SAMPLES, MEASURED_SAMPLES).report());
    results.write("  |  ");

    results.write(new MeanDevAccumulator().addResults(new TimedCallable() {
      private int i = 0;

      @Override
      public void callTimed() throws Exception {
        directClientProtocol.create(ROOT + "newfiled-" + i++, FsPermission.getDefault(),
            metaInfo.getOrigCaller().getUserName(), true, true, (short) 1, 1024);
      }
    }, WARMUP_SAMPLES, MEASURED_SAMPLES).report());
  }
931591
public static lbvserver_stats[] get(nitro_service service) throws Exception{
		lbvserver_stats obj = new lbvserver_stats();
		lbvserver_stats[] response = (lbvserver_stats[])obj.stat_resources(service);
		return response;
	}
649669
public ChannelBuffer formatFilterConfigV1(
      final Map<String, Map<String, String>> config) {
    throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, 
        "The requested API endpoint has not been implemented", 
        this.getClass().getCanonicalName() + 
        " has not implemented formatFilterConfigV1");
  }
715445
def export(self, name, columns, points):
        """"""
        if name == self.plugins_to_export()[0] and self.buffer != {}:
            # One complete loop have been done
            logger.debug("Export stats ({}) to RESTful endpoint ({})".format(listkeys(self.buffer),
                                                                             self.client))
            # Export stats
            post(self.client, json=self.buffer, allow_redirects=True)
            # Reset buffer
            self.buffer = {}

        # Add current stat to the buffer
        self.buffer[name] = dict(zip(columns, points))
538432
protected static List<String> formatMessageParameters(Object[] parameters) {
        List<String> stringParameters = new ArrayList<>(parameters.length);
        for (Object parameter : parameters) {
            stringParameters.add((parameter != null) ? parameter.toString() : null);
        }
        return stringParameters;
    }
704845
public List statistic() {
        List result = new LinkedList();
        for (Iterator iter = calls.keySet().iterator(); iter.hasNext();) {
            Object[] line = new Object[3];
            result.add(line);
            line[0] = iter.next();
            List times = (List) calls.get(line[0]);
            line[1] = times.size() / 2;
            int accTime = 0;
            for (Iterator it = times.iterator(); it.hasNext();) {
                Long start = (Long) it.next();
                Long end = (Long) it.next();
                accTime += end - start;
            }
            line[2] = (long) accTime;
        }
        return result;
    }
966150
public ListStreamStatisticsResponse listStreamStatistics(ListStreamStatisticsRequest request) {
        checkNotNull(request, "The parameter request should NOT be null.");

        checkStringNotEmpty(request.getDomain(), "Domain should NOT be null");
        checkStringNotEmpty(request.getApp(), "App should NOT be null");
        checkStringNotEmpty(request.getStartTime(), "StartTime should NOT be null");

        InternalRequest internalRequest = createRequest(HttpMethodName.GET, request,
                STATISTICS, LIVE_DOMAIN, request.getDomain(), LIVE_STREAM);

        internalRequest.addParameter("app", request.getApp());
        internalRequest.addParameter("startTime", request.getStartTime());
        if (request.getEndTime() != null) {
            internalRequest.addParameter("endTime", request.getEndTime());
        }
        if (request.getKeyword() != null) {
            internalRequest.addParameter("keyword", request.getKeyword());
        }
        if (request.getKeywordType() != null) {
            internalRequest.addParameter("keywordType", request.getKeywordType());
        }
        if (request.getOrderBy() != null) {
            internalRequest.addParameter("orderBy", request.getOrderBy());
        }
        if (request.getPageNo() != null) {
            internalRequest.addParameter("pageNo", request.getPageNo().toString());
        }
        if (request.getPageSize() != null) {
            internalRequest.addParameter("pageSize", request.getPageSize().toString());
        }
        return invokeHttpClient(internalRequest, ListStreamStatisticsResponse.class);
    }