MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / printQueryStats

Method printQueryStats

src/tsd/StatsRpc.java:329–341  ·  view source on GitHub ↗

Print the detailed query stats to the caller using the proper serializer @param query The query to answer to @throws BadRequestException if the API version hasn't been implemented yet

(final HttpQuery query)

Source from the content-addressed store, hash-verified

327 * yet
328 */
329 private void printQueryStats(final HttpQuery query) {
330 switch (query.apiVersion()) {
331 case 0:
332 case 1:
333 query.sendReply(query.serializer().formatQueryStatsV1(
334 QueryStats.getRunningAndCompleteStats()));
335 break;
336 default:
337 throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED,
338 "Requested API version not implemented", "Version " +
339 query.apiVersion() + " is not implemented");
340 }
341 }
342
343 /**
344 * Implements the StatsCollector with ASCII style output. Builds a string

Callers 1

executeMethod · 0.95

Calls 5

apiVersionMethod · 0.80
sendReplyMethod · 0.80
serializerMethod · 0.80
formatQueryStatsV1Method · 0.45

Tested by

no test coverage detected