Search in sources :

Example 1 with CommandCount

use of com.actiontech.dble.statistic.CommandCount in project dble by actiontech.

the class ShowCommand method getRow.

private static RowDataPacket getRow(NIOProcessor processor) {
    CommandCount cc = processor.getCommands();
    RowDataPacket row = new RowDataPacket(FIELD_COUNT);
    row.add(processor.getName().getBytes());
    row.add(LongUtil.toBytes(cc.initDBCount()));
    row.add(LongUtil.toBytes(cc.queryCount()));
    row.add(LongUtil.toBytes(cc.stmtPrepareCount()));
    row.add(LongUtil.toBytes(cc.stmtExecuteCount()));
    row.add(LongUtil.toBytes(cc.stmtCloseCount()));
    row.add(LongUtil.toBytes(cc.pingCount()));
    row.add(LongUtil.toBytes(cc.killCount()));
    row.add(LongUtil.toBytes(cc.quitCount()));
    row.add(LongUtil.toBytes(cc.otherCount()));
    return row;
}
Also used : RowDataPacket(com.actiontech.dble.net.mysql.RowDataPacket) CommandCount(com.actiontech.dble.statistic.CommandCount)

Aggregations

RowDataPacket (com.actiontech.dble.net.mysql.RowDataPacket)1 CommandCount (com.actiontech.dble.statistic.CommandCount)1