Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
4032e95d
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4032e95d
编写于
2月 12, 2018
作者:
彭
彭勇升 pengys
提交者:
GitHub
2月 12, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #812 from peng-yongsheng/feature/getAlarmTrend
Provide the getAlarmTrend query.
上级
1bef96db
fb1c99df
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
182 addition
and
6 deletion
+182
-6
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/StorageModule.java
...pache/skywalking/apm/collector/storage/StorageModule.java
+2
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/ui/IApplicationAlarmListUIDAO.java
.../collector/storage/dao/ui/IApplicationAlarmListUIDAO.java
+31
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/ui/overview/AlarmTrend.java
...walking/apm/collector/storage/ui/overview/AlarmTrend.java
+15
-1
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/StorageModuleEsProvider.java
...ing/apm/collector/storage/es/StorageModuleEsProvider.java
+4
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ui/ApplicationAlarmListEsUIDAO.java
...lector/storage/es/dao/ui/ApplicationAlarmListEsUIDAO.java
+69
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/StorageModuleH2Provider.java
...ing/apm/collector/storage/h2/StorageModuleH2Provider.java
+4
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/ui/ApplicationAlarmListH2UIDAO.java
...lector/storage/h2/dao/ui/ApplicationAlarmListH2UIDAO.java
+39
-0
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/OverViewLayerQuery.java
...skywalking/apm/collector/ui/query/OverViewLayerQuery.java
+4
-1
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/AlarmService.java
...che/skywalking/apm/collector/ui/service/AlarmService.java
+14
-4
未找到文件。
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/StorageModule.java
浏览文件 @
4032e95d
...
...
@@ -105,6 +105,7 @@ import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceDay
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationAlarmListUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationAlarmUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationComponentUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationMappingUIDAO
;
...
...
@@ -264,6 +265,7 @@ public class StorageModule extends Module {
classes
.
add
(
IApplicationAlarmUIDAO
.
class
);
classes
.
add
(
IInstanceAlarmUIDAO
.
class
);
classes
.
add
(
IServiceAlarmUIDAO
.
class
);
classes
.
add
(
IApplicationAlarmListUIDAO
.
class
);
}
private
void
addAlarmDAO
(
List
<
Class
>
classes
)
{
...
...
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/ui/IApplicationAlarmListUIDAO.java
0 → 100644
浏览文件 @
4032e95d
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.collector.storage.dao.ui
;
import
java.util.List
;
import
org.apache.skywalking.apm.collector.storage.base.dao.DAO
;
import
org.apache.skywalking.apm.collector.storage.ui.common.Step
;
/**
* @author peng-yongsheng
*/
public
interface
IApplicationAlarmListUIDAO
extends
DAO
{
List
<
Integer
>
getAlarmedApplicationNum
(
Step
step
,
long
start
,
long
end
);
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/ui/overview/AlarmTrend.java
浏览文件 @
4032e95d
...
...
@@ -18,11 +18,25 @@
package
org.apache.skywalking.apm.collector.storage.ui.overview
;
import
java.util.LinkedList
;
import
java.util.List
;
/**
* @author peng-yongsheng
*/
public
class
AlarmTrend
{
public
List
<
Integer
>
numOfAlarmRate
;
private
List
<
Integer
>
numOfAlarmRate
;
public
AlarmTrend
()
{
this
.
numOfAlarmRate
=
new
LinkedList
<>();
}
public
List
<
Integer
>
getNumOfAlarmRate
()
{
return
numOfAlarmRate
;
}
public
void
setNumOfAlarmRate
(
List
<
Integer
>
numOfAlarmRate
)
{
this
.
numOfAlarmRate
=
numOfAlarmRate
;
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/StorageModuleEsProvider.java
浏览文件 @
4032e95d
...
...
@@ -114,6 +114,7 @@ import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceDay
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationAlarmListUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationAlarmUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationComponentUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationMappingUIDAO
;
...
...
@@ -220,6 +221,7 @@ import org.apache.skywalking.apm.collector.storage.es.dao.srmp.ServiceReferenceH
import
org.apache.skywalking.apm.collector.storage.es.dao.srmp.ServiceReferenceMinuteMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.srmp.ServiceReferenceMonthMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.ui.ApplicationAlarmEsUIDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.ui.ApplicationAlarmListEsUIDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.ui.ApplicationComponentEsUIDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.ui.ApplicationMappingEsUIDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.ui.ApplicationMetricEsUIDAO
;
...
...
@@ -430,6 +432,8 @@ public class StorageModuleEsProvider extends ModuleProvider {
this
.
registerServiceImplementation
(
IApplicationAlarmUIDAO
.
class
,
new
ApplicationAlarmEsUIDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IInstanceAlarmUIDAO
.
class
,
new
InstanceAlarmEsUIDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IServiceAlarmUIDAO
.
class
,
new
ServiceAlarmEsUIDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IApplicationAlarmListUIDAO
.
class
,
new
ApplicationAlarmListEsUIDAO
(
elasticSearchClient
));
}
private
void
registerAlarmDAO
()
throws
ServiceNotProvidedException
{
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ui/ApplicationAlarmListEsUIDAO.java
0 → 100644
浏览文件 @
4032e95d
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.collector.storage.es.dao.ui
;
import
java.util.LinkedList
;
import
java.util.List
;
import
org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationAlarmListUIDAO
;
import
org.apache.skywalking.apm.collector.storage.es.base.dao.EsDAO
;
import
org.apache.skywalking.apm.collector.storage.table.alarm.ApplicationAlarmListTable
;
import
org.apache.skywalking.apm.collector.storage.ui.common.Step
;
import
org.apache.skywalking.apm.collector.storage.utils.TimePyramidTableNameBuilder
;
import
org.elasticsearch.action.search.SearchRequestBuilder
;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.action.search.SearchType
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.aggregations.AggregationBuilders
;
import
org.elasticsearch.search.aggregations.bucket.terms.Terms
;
/**
* @author peng-yongsheng
*/
public
class
ApplicationAlarmListEsUIDAO
extends
EsDAO
implements
IApplicationAlarmListUIDAO
{
public
ApplicationAlarmListEsUIDAO
(
ElasticSearchClient
client
)
{
super
(
client
);
}
@Override
public
List
<
Integer
>
getAlarmedApplicationNum
(
Step
step
,
long
start
,
long
end
)
{
String
tableName
=
TimePyramidTableNameBuilder
.
build
(
step
,
ApplicationAlarmListTable
.
TABLE
);
SearchRequestBuilder
searchRequestBuilder
=
getClient
().
prepareSearch
(
tableName
);
searchRequestBuilder
.
setTypes
(
ApplicationAlarmListTable
.
TABLE_TYPE
);
searchRequestBuilder
.
setSearchType
(
SearchType
.
DFS_QUERY_THEN_FETCH
);
searchRequestBuilder
.
setQuery
(
QueryBuilders
.
rangeQuery
(
ApplicationAlarmListTable
.
COLUMN_TIME_BUCKET
).
gte
(
start
).
lte
(
end
));
searchRequestBuilder
.
setSize
(
0
);
searchRequestBuilder
.
addAggregation
(
AggregationBuilders
.
terms
(
ApplicationAlarmListTable
.
COLUMN_TIME_BUCKET
).
field
(
ApplicationAlarmListTable
.
COLUMN_TIME_BUCKET
).
size
(
100
)
.
subAggregation
(
AggregationBuilders
.
terms
(
ApplicationAlarmListTable
.
COLUMN_APPLICATION_ID
).
field
(
ApplicationAlarmListTable
.
COLUMN_APPLICATION_ID
).
size
(
100
)));
SearchResponse
searchResponse
=
searchRequestBuilder
.
execute
().
actionGet
();
Terms
timeBucketTerms
=
searchResponse
.
getAggregations
().
get
(
ApplicationAlarmListTable
.
COLUMN_TIME_BUCKET
);
List
<
Integer
>
alarmApplicationNum
=
new
LinkedList
<>();
for
(
Terms
.
Bucket
timeBucketBucket
:
timeBucketTerms
.
getBuckets
())
{
Terms
applicationBucketTerms
=
timeBucketBucket
.
getAggregations
().
get
(
ApplicationAlarmListTable
.
COLUMN_APPLICATION_ID
);
int
num
=
applicationBucketTerms
.
getBuckets
().
size
();
alarmApplicationNum
.
add
(
num
);
}
return
alarmApplicationNum
;
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/StorageModuleH2Provider.java
浏览文件 @
4032e95d
...
...
@@ -110,6 +110,7 @@ import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceDay
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationAlarmListUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationAlarmUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationComponentUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationMappingUIDAO
;
...
...
@@ -216,6 +217,7 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.srmp.ServiceReferenceH
import
org.apache.skywalking.apm.collector.storage.h2.dao.srmp.ServiceReferenceMinuteMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.srmp.ServiceReferenceMonthMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.ui.ApplicationAlarmH2UIDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.ui.ApplicationAlarmListH2UIDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.ui.ApplicationComponentH2UIDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.ui.ApplicationMappingH2UIDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.ui.ApplicationMetricH2UIDAO
;
...
...
@@ -406,6 +408,8 @@ public class StorageModuleH2Provider extends ModuleProvider {
this
.
registerServiceImplementation
(
IApplicationAlarmUIDAO
.
class
,
new
ApplicationAlarmH2UIDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IInstanceAlarmUIDAO
.
class
,
new
InstanceAlarmH2UIDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IServiceAlarmUIDAO
.
class
,
new
ServiceAlarmH2UIDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IApplicationAlarmListUIDAO
.
class
,
new
ApplicationAlarmListH2UIDAO
(
h2Client
));
}
private
void
registerAlarmDAO
()
throws
ServiceNotProvidedException
{
...
...
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/ui/ApplicationAlarmListH2UIDAO.java
0 → 100644
浏览文件 @
4032e95d
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.collector.storage.h2.dao.ui
;
import
java.util.List
;
import
org.apache.skywalking.apm.collector.client.h2.H2Client
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationAlarmListUIDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO
;
import
org.apache.skywalking.apm.collector.storage.ui.common.Step
;
/**
* @author peng-yongsheng
*/
public
class
ApplicationAlarmListH2UIDAO
extends
H2DAO
implements
IApplicationAlarmListUIDAO
{
public
ApplicationAlarmListH2UIDAO
(
H2Client
client
)
{
super
(
client
);
}
@Override
public
List
<
Integer
>
getAlarmedApplicationNum
(
Step
step
,
long
start
,
long
end
)
{
return
null
;
}
}
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/OverViewLayerQuery.java
浏览文件 @
4032e95d
...
...
@@ -109,10 +109,13 @@ public class OverViewLayerQuery implements Query {
}
public
AlarmTrend
getAlarmTrend
(
Duration
duration
)
throws
ParseException
{
long
startTimeBucket
=
DurationUtils
.
INSTANCE
.
exchangeToTimeBucket
(
duration
.
getStart
());
long
endTimeBucket
=
DurationUtils
.
INSTANCE
.
exchangeToTimeBucket
(
duration
.
getEnd
());
long
start
=
DurationUtils
.
INSTANCE
.
durationToSecondTimeBucket
(
duration
.
getStep
(),
duration
.
getStart
());
long
end
=
DurationUtils
.
INSTANCE
.
durationToSecondTimeBucket
(
duration
.
getStep
(),
duration
.
getEnd
());
return
getAlarmService
().
getApplicationAlarmTrend
(
duration
.
getStep
(),
start
,
end
);
return
getAlarmService
().
getApplicationAlarmTrend
(
duration
.
getStep
(),
start
TimeBucket
,
endTimeBucket
,
start
,
end
);
}
public
ConjecturalAppBrief
getConjecturalApps
(
Duration
duration
)
throws
ParseException
{
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/AlarmService.java
浏览文件 @
4032e95d
...
...
@@ -22,14 +22,15 @@ import java.text.ParseException;
import
java.util.List
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.storage.StorageModule
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationAlarmListUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationAlarmUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IInstanceAlarmUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IInstanceUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IServiceAlarmUIDAO
;
import
org.apache.skywalking.apm.collector.storage.ui.alarm.Alarm
;
import
org.apache.skywalking.apm.collector.storage.ui.application.Application
;
import
org.apache.skywalking.apm.collector.storage.ui.common.Step
;
import
org.apache.skywalking.apm.collector.storage.ui.overview.AlarmTrend
;
import
org.apache.skywalking.apm.collector.storage.utils.DurationPoint
;
import
org.apache.skywalking.apm.collector.ui.utils.DurationUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -40,14 +41,18 @@ public class AlarmService {
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AlarmService
.
class
);
private
final
IInstanceUIDAO
instanceDAO
;
private
final
IApplicationAlarmUIDAO
applicationAlarmUIDAO
;
private
final
IInstanceAlarmUIDAO
instanceAlarmUIDAO
;
private
final
IServiceAlarmUIDAO
serviceAlarmUIDAO
;
private
final
IApplicationAlarmListUIDAO
applicationAlarmListUIDAO
;
public
AlarmService
(
ModuleManager
moduleManager
)
{
this
.
instanceDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
IInstanceUIDAO
.
class
);
this
.
applicationAlarmUIDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
IApplicationAlarmUIDAO
.
class
);
this
.
instanceAlarmUIDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
IInstanceAlarmUIDAO
.
class
);
this
.
serviceAlarmUIDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
IServiceAlarmUIDAO
.
class
);
this
.
applicationAlarmListUIDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
IApplicationAlarmListUIDAO
.
class
);
}
public
Alarm
loadApplicationAlarmList
(
String
keyword
,
long
start
,
long
end
,
...
...
@@ -68,10 +73,15 @@ public class AlarmService {
return
serviceAlarmUIDAO
.
loadAlarmList
(
keyword
,
start
,
end
,
limit
,
from
);
}
public
AlarmTrend
getApplicationAlarmTrend
(
Step
step
,
long
start
,
long
end
)
throws
ParseException
{
List
<
DurationPoint
>
durationPoints
=
DurationUtils
.
INSTANCE
.
getDurationPoints
(
step
,
start
,
end
);
public
AlarmTrend
getApplicationAlarmTrend
(
Step
step
,
long
startTimeBucket
,
long
endTimeBucket
,
long
start
,
long
end
)
throws
ParseException
{
List
<
Application
>
applications
=
instanceDAO
.
getApplications
(
start
,
end
);
List
<
Integer
>
applicationNum
=
applicationAlarmListUIDAO
.
getAlarmedApplicationNum
(
step
,
startTimeBucket
,
endTimeBucket
);
AlarmTrend
alarmTrend
=
new
AlarmTrend
();
applicationNum
.
forEach
(
num
->
{
alarmTrend
.
getNumOfAlarmRate
().
add
((
num
*
10000
)
/
(
applications
.
size
()));
});
return
alarmTrend
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录