Explorar el Código

标准化测试扩充

LingxinMeng hace 2 años
padre
commit
5268361640

+ 4 - 0
simulation-resource-scheduler/src/main/java/com/css/simulation/resource/scheduler/application/service/ProjectService.java

@@ -594,8 +594,10 @@ public class ProjectService {
                 final int yamlCount = yamlPathCacheKeySetGroupByNodeName.size();
                 // 修改全部yaml
                 nodeMapToUse.forEach((nodeNameAfter, parallelismToUse) -> {
+                    log.info("修改yaml执行节点 {} -> {}:{}", nodeNameBefore, nodeNameAfter, yamlPathCacheKeySetGroupByNodeName);
                     int shareNum = yamlCount / totalParallelism * parallelismToUse;
                     for (int i = 0; i < shareNum; i++) {
+                        log.info("将yaml按比例均分给节点 {}", nodeNameAfter);
                         final String yamlPathCacheKeyBefore = yamlPathCacheKeySetGroupByNodeName.get(i);
                         final String yamlPathCacheKeyAfter = yamlPathCacheKeyBefore.replace(nodeNameBefore, nodeNameAfter);
                         final String yamlPath = customRedisClient.get(yamlPathCacheKeyBefore);
@@ -606,9 +608,11 @@ public class ProjectService {
                         customRedisClient.delete(yamlPathCacheKeyBefore);
                         customRedisClient.set(yamlPathCacheKeyAfter, yamlPath);
                         if (i < parallelismToUse) {
+                            log.info("均分之后可直接执行部分yaml:{}", yamlPath);
                             // 修改 cpu 编号
                             // 根据各节点剩余并行度,倒序获取 cpu 编号
                             int cpuOrderAfter = remainderNodeMap.get(nodeNameAfter) - 1 - i;
+                            log.info("CPU 编号 {}", cpuOrderAfter);
                             String cpuOrderString = String.valueOf(cpuOrderAfter);
                             final String read = FileUtil.read(yamlPath);
                             final String replace = read.replace("cpu-order", "\"" + cpuOrderString + "\"");