MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / printThreadStats

Method printThreadStats

test/tsd/TestStatsRpc.java:80–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78// }
79
80 @Test
81 public void printThreadStats() throws Exception {
82 final StatsRpc rpc = new StatsRpc();
83 HttpQuery query = NettyMocks.getQuery(tsdb, "/api/stats/threads");
84 rpc.execute(tsdb, query);
85 assertEquals(HttpResponseStatus.OK, query.response().getStatus());
86 final String json =
87 query.response().getContent().toString(Charset.forName("UTF-8"));
88 assertNotNull(json);
89 // check for some standard JVM threads since we can't mock Thread easily
90 assertTrue(json.contains("\"name\":\"Finalizer\""));
91 assertTrue(json.contains("java.lang.ref.Finalizer$FinalizerThread.run"));
92 }
93
94 @Test
95 public void printJVMStats() throws Exception {

Callers

nothing calls this directly

Calls 7

getQueryMethod · 0.95
executeMethod · 0.95
responseMethod · 0.80
containsMethod · 0.80
getStatusMethod · 0.65
toStringMethod · 0.45
getContentMethod · 0.45

Tested by

no test coverage detected