[ISSUE #591] nanotimer started twice (#603)

bug(console) add @EnableScheduling to enable cronjobs

bug(console) fix NanoTimer started twice problem
This commit is contained in:
affe
2020-07-28 17:30:24 +08:00
committed by GitHub
parent c55baccc71
commit 018512e7db
2 changed files with 7 additions and 6 deletions

View File

@@ -74,7 +74,7 @@ public class DashboardCollectTask {
return; return;
} }
Date date = new Date(); Date date = new Date();
Stopwatch stopwatch = Stopwatch.createStarted(); Stopwatch stopwatch = Stopwatch.createUnstarted();
try { try {
TopicList topicList = mqAdminExt.fetchAllTopicList(); TopicList topicList = mqAdminExt.fetchAllTopicList();
Set<String> topicSet = topicList.getTopicList(); Set<String> topicSet = topicList.getTopicList();
@@ -104,12 +104,13 @@ public class DashboardCollectTask {
BrokerStatsData bsd = mqAdminExt.viewBrokerStatsData(masterAddr, BrokerStatsManager.TOPIC_PUT_NUMS, topic); BrokerStatsData bsd = mqAdminExt.viewBrokerStatsData(masterAddr, BrokerStatsManager.TOPIC_PUT_NUMS, topic);
stopwatch.stop(); stopwatch.stop();
log.info("stop time : {}", stopwatch.toString()); log.info("stop time : {}", stopwatch.toString());
stopwatch.reset();
inTPS += bsd.getStatsMinute().getTps(); inTPS += bsd.getStatsMinute().getTps();
inMsgCntToday += StatsAllSubCommand.compute24HourSum(bsd); inMsgCntToday += StatsAllSubCommand.compute24HourSum(bsd);
} }
catch (Exception e) { catch (Exception e) {
// throw Throwables.propagate(e); stopwatch.reset();
log.error("Exception caught: mqAdminExt get broker stats data TOPIC_PUT_NUMS failed", e);
} }
} }
} }
@@ -127,7 +128,7 @@ public class DashboardCollectTask {
outMsgCntToday += StatsAllSubCommand.compute24HourSum(bsd); outMsgCntToday += StatsAllSubCommand.compute24HourSum(bsd);
} }
catch (Exception e) { catch (Exception e) {
// throw Throwables.propagate(e); log.error("Exception caught: mqAdminExt get broker stats data GROUP_GET_NUMS failed", e);
} }
} }
} }

View File

@@ -288,7 +288,7 @@ app.controller('dashboardCtrl', ['$scope','$rootScope','$translate','$filter','N
} }
var getBrokerBarChartOp = function(xAxisData,data){ var getBrokerBarChartOp = function(xAxisData,data){
// 指定图表的配置项和数据
var option = { var option = {
xAxis: { xAxis: {
data: xAxisData, data: xAxisData,
@@ -477,7 +477,7 @@ app.controller('dashboardCtrl', ['$scope','$rootScope','$translate','$filter','N
if(flag){ if(flag){
xAxisData.push($filter('date')(tpsArray[0], "HH:mm:ss")); xAxisData.push($filter('date')(tpsArray[0], "HH:mm:ss"));
} }
_tps.push(tpsArray[3]); _tps.push(tpsArray[2]);
}) })
flag = false; flag = false;
var _series = { var _series = {