@Override
    public List<JVMThreadDataPo> queryAvg(MDataPaginationReq request) {
        return new SelectSql(getSqlTemplate())
                .select()
                .columns("timestamp",
                        "AVG(daemon_thread_count) AS daemon_thread_count",
                        "AVG(thread_count) AS thread_count",
                        "AVG(total_started_thread_count) AS total_started_thread_count",
                        "AVG(dead_locked_thread_count) AS dead_locked_thread_count",
                        "AVG(process_cpu_time_rate) AS process_cpu_time_rate")
                .from()
                .table(getTableName())
                .whereSql(buildWhereSql(request))
                .groupBy(" timestamp ASC ")
                .limit(request.getStart(), request.getLimit())
                .list(RshHandler.JVM_THREAD_SUM_M_DATA_RSH);
    }
@author Robert HG (254963746@qq.com) on 3/9/16.
lts-admin/src/main/java/com/github/ltsopensource/admin/access/mysql/MysqlBackendJVMThreadAccess.java