算法调整
This commit is contained in:
@@ -91,22 +91,21 @@ public class ExecutionCenter extends BaseController {
|
|||||||
* @date 2023/11/7 14:44
|
* @date 2023/11/7 14:44
|
||||||
*/
|
*/
|
||||||
private void dealResponse(CalculatedParam calculatedParam, LiteflowResponse liteflowResponse, String methodDescribe) {
|
private void dealResponse(CalculatedParam calculatedParam, LiteflowResponse liteflowResponse, String methodDescribe) {
|
||||||
|
Runtime runtime = Runtime.getRuntime();
|
||||||
|
// 获取 JVM 最大可用内存(以字节为单位)
|
||||||
|
long maxMemory = runtime.maxMemory();
|
||||||
|
// 获取 JVM 当前已分配的内存(以字节为单位)
|
||||||
|
long totalMemory = runtime.totalMemory();
|
||||||
|
// 获取 JVM 当前空闲内存(以字节为单位)
|
||||||
|
long freeMemory = runtime.freeMemory();
|
||||||
|
// 计算已使用的内存
|
||||||
|
long usedMemory = totalMemory - freeMemory;
|
||||||
|
|
||||||
|
System.out.println("最大可用内存: " + maxMemory / (1024 * 1024) + " MB");
|
||||||
|
System.out.println("当前已分配的内存: " + totalMemory / (1024 * 1024) + " MB");
|
||||||
|
System.out.println("当前空闲内存: " + freeMemory / (1024 * 1024) + " MB");
|
||||||
|
System.out.println("已使用的内存: " + usedMemory / (1024 * 1024) + " MB");
|
||||||
if (liteflowResponse.isSuccess()) {
|
if (liteflowResponse.isSuccess()) {
|
||||||
Runtime runtime = Runtime.getRuntime();
|
|
||||||
// 获取 JVM 最大可用内存(以字节为单位)
|
|
||||||
long maxMemory = runtime.maxMemory();
|
|
||||||
// 获取 JVM 当前已分配的内存(以字节为单位)
|
|
||||||
long totalMemory = runtime.totalMemory();
|
|
||||||
// 获取 JVM 当前空闲内存(以字节为单位)
|
|
||||||
long freeMemory = runtime.freeMemory();
|
|
||||||
// 计算已使用的内存
|
|
||||||
long usedMemory = totalMemory - freeMemory;
|
|
||||||
|
|
||||||
System.out.println("最大可用内存: " + maxMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("当前已分配的内存: " + totalMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("当前空闲内存: " + freeMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("已使用的内存: " + usedMemory / (1024 * 1024) + " MB");
|
|
||||||
|
|
||||||
// 获取执行步骤列表
|
// 获取执行步骤列表
|
||||||
long allTime = 0;
|
long allTime = 0;
|
||||||
Map<String, List<CmpStep>> executeSteps = liteflowResponse.getExecuteSteps();
|
Map<String, List<CmpStep>> executeSteps = liteflowResponse.getExecuteSteps();
|
||||||
|
|||||||
Reference in New Issue
Block a user