Telnet RPC responder that returns the stats in ASCII style @param tsdb The TSDB to use for fetching stats @param chan The netty channel to respond on @param cmd call parameters
(final TSDB tsdb, final Channel chan,
final String[] cmd)
| 57 | * @param cmd call parameters |
| 58 | */ |
| 59 | public Deferred<Object> execute(final TSDB tsdb, final Channel chan, |
| 60 | final String[] cmd) { |
| 61 | final boolean canonical = tsdb.getConfig().getBoolean("tsd.stats.canonical"); |
| 62 | final StringBuilder buf = new StringBuilder(1024); |
| 63 | final ASCIICollector collector = new ASCIICollector("tsd", buf, null); |
| 64 | doCollectStats(tsdb, collector, canonical); |
| 65 | chan.write(buf.toString()); |
| 66 | return Deferred.fromResult(null); |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * HTTP resposne handler |