Skip to content

Commit 6d916ca

Browse files
committed
Merge remote-tracking branch 'origin/4.18'
2 parents 1411da1 + 969e094 commit 6d916ca

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

server/src/main/java/com/cloud/server/StatsCollector.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -647,13 +647,12 @@ class HostCollector extends AbstractStatsCollector {
647647
@Override
648648
protected void runInContext() {
649649
try {
650-
LOGGER.debug("HostStatsCollector is running...");
651-
652650
SearchCriteria<HostVO> sc = createSearchCriteriaForHostTypeRoutingStateUpAndNotInMaintenance();
653-
654-
Map<Object, Object> metrics = new HashMap<>();
655651
List<HostVO> hosts = _hostDao.search(sc, null);
656652

653+
LOGGER.debug(String.format("HostStatsCollector is running to process %d UP hosts", hosts.size()));
654+
655+
Map<Object, Object> metrics = new HashMap<>();
657656
for (HostVO host : hosts) {
658657
HostStatsEntry hostStatsEntry = (HostStatsEntry) _resourceMgr.getHostStatistics(host.getId());
659658
if (hostStatsEntry != null) {
@@ -1195,13 +1194,12 @@ class VmStatsCollector extends AbstractStatsCollector {
11951194
@Override
11961195
protected void runInContext() {
11971196
try {
1198-
LOGGER.trace("VmStatsCollector is running...");
1199-
12001197
SearchCriteria<HostVO> sc = createSearchCriteriaForHostTypeRoutingStateUpAndNotInMaintenance();
12011198
List<HostVO> hosts = _hostDao.search(sc, null);
12021199

1203-
Map<Object, Object> metrics = new HashMap<>();
1200+
LOGGER.debug(String.format("VmStatsCollector is running to process VMs across %d UP hosts", hosts.size()));
12041201

1202+
Map<Object, Object> metrics = new HashMap<>();
12051203
for (HostVO host : hosts) {
12061204
Date timestamp = new Date();
12071205
Map<Long, VMInstanceVO> vmMap = getVmMapForStatsForHost(host);

0 commit comments

Comments
 (0)