26 changed files with 391 additions and 41 deletions
@ -1,21 +0,0 @@ |
|||
package org.nl.config.thread; |
|||
|
|||
import org.dromara.dynamictp.common.entity.ThreadPoolStats; |
|||
import org.dromara.dynamictp.core.monitor.collector.AbstractCollector; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: |
|||
* @Date: 2023/12/25 |
|||
*/ |
|||
public class TestCollector extends AbstractCollector { |
|||
@Override |
|||
public void collect(ThreadPoolStats threadPoolStats) { |
|||
// System.out.println("ssssssssssssssss:" + threadPoolStats);
|
|||
} |
|||
|
|||
@Override |
|||
public String type() { |
|||
return "test_collect"; |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
package org.nl.config.thread; |
|||
|
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.dromara.dynamictp.common.entity.ThreadPoolStats; |
|||
import org.dromara.dynamictp.core.monitor.collector.AbstractCollector; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: 线程监控 |
|||
* @Date: 2023/12/25 |
|||
*/ |
|||
@Slf4j |
|||
public class ThreadMonitorCollector extends AbstractCollector { |
|||
public static ThreadPoolStats TOMCAT_THREAD; |
|||
public static ThreadPoolStats EL_THREAD; |
|||
@Override |
|||
public void collect(ThreadPoolStats threadPoolStats) { |
|||
if ("tomcatTp".equals(threadPoolStats.getPoolName())) { |
|||
ThreadMonitorCollector.TOMCAT_THREAD = threadPoolStats; |
|||
} else { |
|||
ThreadMonitorCollector.EL_THREAD = threadPoolStats; |
|||
} |
|||
log.info("线程池数据:{}", threadPoolStats); |
|||
} |
|||
|
|||
@Override |
|||
public String type() { |
|||
return "test_collect"; |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
package org.nl.wms.report.service.dao.vo; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: 滚筒线数据 |
|||
* @Date: 2024/1/2 |
|||
*/ |
|||
@Data |
|||
public class InsideDrumLineVo { |
|||
private String vehicle_code; |
|||
private String pcsn; |
|||
private String material_qty; |
|||
private String material_code; |
|||
private String material_name; |
|||
} |
@ -1 +1 @@ |
|||
org.nl.config.thread.TestCollector |
|||
org.nl.config.thread.ThreadMonitorCollector |
|||
|
@ -0,0 +1,138 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-row> |
|||
<el-col :span="24" class="card-box"> |
|||
<el-card> |
|||
<div slot="header"> |
|||
<span>基本信息</span> |
|||
</div> |
|||
<div v-for="(item, index) in threadDataList" :key="index" class="el-table el-table--enable-row-hover el-table--medium"> |
|||
<table cellspacing="0" style="width: 100%"> |
|||
<tbody> |
|||
<tr> |
|||
<td><div class="cell">线程池名称:</div></td> |
|||
<td><div class="cell">{{ item.poolName }}</div></td> |
|||
<td><div class="cell">别名:</div></td> |
|||
<td><div class="cell">{{ item.poolAliasName }}</div></td> |
|||
<td><div class="cell">核心线程数:</div></td> |
|||
<td><div class="cell">{{ item.corePoolSize }}</div></td> |
|||
<td><div class="cell">最大线程数:</div></td> |
|||
<td><div class="cell">{{ item.maximumPoolSize }}</div></td> |
|||
</tr> |
|||
<tr> |
|||
<td><div class="cell">队列类型:</div></td> |
|||
<td><div class="cell">{{ item.queueType }}</div></td> |
|||
<td><div class="cell">队列容量:</div></td> |
|||
<td><div class="cell">{{ item.queueCapacity }}</div></td> |
|||
<td><div class="cell">队列任务数量:</div></td> |
|||
<td><div class="cell">{{ item.queueSize }}</div></td> |
|||
<td><div class="cell">SynchronousQueue队列模式:</div></td> |
|||
<td><div class="cell">{{ item.fair }}</div></td> |
|||
</tr> |
|||
<tr> |
|||
<td><div class="cell">队列剩余容量:</div></td> |
|||
<td><div class="cell">{{ item.queueRemainingCapacity }}</div></td> |
|||
<td><div class="cell">正在执行任务的活跃线程大致总数:</div></td> |
|||
<td><div class="cell">{{ item.activeCount }}</div></td> |
|||
<td><div class="cell">大致任务总数:</div></td> |
|||
<td><div class="cell">{{ item.taskCount }} </div></td> |
|||
<td><div class="cell">已执行完成的大致任务总数:</div></td> |
|||
<td><div class="cell">{{ item.completedTaskCount }}</div></td> |
|||
</tr> |
|||
<tr> |
|||
<td><div class="cell">池中曾经同时存在的最大线程数量:</div></td> |
|||
<td><div class="cell">{{ item.largestPoolSize }}</div></td> |
|||
<td><div class="cell">当前池中存在的线程总数:</div></td> |
|||
<td><div class="cell">{{ item.poolSize }}</div></td> |
|||
<td><div class="cell">等待执行的任务数量:</div></td> |
|||
<td><div class="cell">{{ item.waitTaskCount }} </div></td> |
|||
<td><div class="cell">拒绝的任务数量:</div></td> |
|||
<td><div class="cell">{{ item.rejectCount }}</div></td> |
|||
</tr> |
|||
<tr> |
|||
<td><div class="cell">拒绝策略名称:</div></td> |
|||
<td><div class="cell">{{ item.rejectHandlerName }}</div></td> |
|||
<td><div class="cell">是否DtpExecutor线程池:</div></td> |
|||
<td><div class="cell">{{ item.dynamic }}</div></td> |
|||
<td><div class="cell">执行超时任务数量:</div></td> |
|||
<td><div class="cell">{{ item.runTimeoutCount }} </div></td> |
|||
<td><div class="cell">在队列等待超时任务数量:</div></td> |
|||
<td><div class="cell">{{ item.queueTimeoutCount }}</div></td> |
|||
</tr> |
|||
<tr> |
|||
<td><div class="cell">tps:</div></td> |
|||
<td><div class="cell">{{ item.tps }}</div></td> |
|||
<td><div class="cell">最大任务耗时:</div></td> |
|||
<td><div class="cell">{{ item.maxRt }}</div></td> |
|||
<td><div class="cell">最小任务耗时:</div></td> |
|||
<td><div class="cell">{{ item.minRt }} </div></td> |
|||
<td><div class="cell">任务平均耗时(单位:ms):</div></td> |
|||
<td><div class="cell">{{ item.avg }}</div></td> |
|||
</tr> |
|||
<tr> |
|||
<td><div class="cell">满足50%的任务执行所需的最低耗时:</div></td> |
|||
<td><div class="cell">{{ item.tp50 }}</div></td> |
|||
<td><div class="cell">满足75%的任务执行所需的最低耗时:</div></td> |
|||
<td><div class="cell">{{ item.tp75 }}</div></td> |
|||
<td><div class="cell">满足90%的任务执行所需的最低耗时:</div></td> |
|||
<td><div class="cell">{{ item.tp90 }} </div></td> |
|||
<td><div class="cell">满足95%的任务执行所需的最低耗时:</div></td> |
|||
<td><div class="cell">{{ item.tp95 }}</div></td> |
|||
</tr> |
|||
<tr> |
|||
<td><div class="cell">满足99%的任务执行所需的最低耗时:</div></td> |
|||
<td><div class="cell">{{ item.tp99 }}</div></td> |
|||
<td><div class="cell">满足99.9%的任务执行所需的最低耗时:</div></td> |
|||
<td><div class="cell">{{ item.tp999 }}</div></td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
<br> |
|||
</div> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { initData } from '@/api/data' |
|||
export default { |
|||
name: 'Threads', |
|||
data() { |
|||
return { |
|||
// 线程数组 |
|||
threadDataList: [], |
|||
url: 'api/monitor/getThreadData', |
|||
monitor: null |
|||
} |
|||
}, |
|||
created() { |
|||
this.init() |
|||
this.monitor = window.setInterval(() => { |
|||
setTimeout(() => { |
|||
this.init() |
|||
}, 2) |
|||
}, 3500) |
|||
}, |
|||
destroyed() { |
|||
clearInterval(this.monitor) |
|||
}, |
|||
methods: { |
|||
// 初始化数据 |
|||
init() { |
|||
initData(this.url, {}).then(data => { |
|||
this.threadDataList = data |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
.card-box { |
|||
padding-right: 15px; |
|||
padding-left: 15px; |
|||
margin-bottom: 10px; |
|||
} |
|||
</style> |
@ -0,0 +1,63 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--工具栏--> |
|||
<div class="head-container"> |
|||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|||
<crudOperation :permission="permission" /> |
|||
<!--表格渲染--> |
|||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> |
|||
<el-table-column type="selection" width="55" /> |
|||
<el-table-column prop="vehicle_code" label="托盘号" :min-width="flexWidth('vehicle_code',crud.data,'托盘号')" /> |
|||
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'数量')" /> |
|||
<el-table-column prop="material_code" label="产品编码" :min-width="flexWidth('material_code',crud.data,'拆垛工位')" /> |
|||
<el-table-column prop="material_name" label="产品名称" :min-width="flexWidth('material_name',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="material_qty" label="产品数量" :min-width="flexWidth('material_qty',crud.data,'分拣工单')" /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import CRUD, { crud, header, presenter } from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import crudOperation from '@crud/CRUD.operation' |
|||
import udOperation from '@crud/UD.operation' |
|||
import pagination from '@crud/Pagination' |
|||
export default { |
|||
name: 'InsideDrumLine', |
|||
components: { pagination, crudOperation, rrOperation, udOperation }, |
|||
mixins: [presenter(), header(), crud()], |
|||
cruds() { |
|||
return CRUD({ |
|||
title: '滚筒线内记录报表', |
|||
url: 'api/report/insideDrumLineReport', |
|||
optShow: { |
|||
add: false, |
|||
edit: false, |
|||
del: false, |
|||
download: false |
|||
} |
|||
}) |
|||
}, |
|||
data() { |
|||
return { |
|||
permission: { |
|||
}, |
|||
rules: { |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
|||
[CRUD.HOOK.beforeRefresh]() { |
|||
return true |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
Loading…
Reference in new issue