Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
阿信在这里
SkyWalking
提交
c6dce72b
S
SkyWalking
项目概览
阿信在这里
/
SkyWalking
与 Fork 源项目一致
Fork自
山不在高_有仙则灵 / SkyWalking
通知
1
Star
0
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
未验证
提交
c6dce72b
编写于
3月 04, 2018
作者:
wu-sheng
提交者:
GitHub
3月 04, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into sync-ui
上级
fd3d5ad9
e7b30148
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
85 addition
and
27 deletion
+85
-27
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandler.java
...agent/grpc/provider/handler/JVMMetricsServiceHandler.java
+9
-0
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ServiceNameDiscoveryServiceHandler.java
.../provider/handler/ServiceNameDiscoveryServiceHandler.java
+1
-1
apm-collector/apm-collector-analysis/analysis-register/register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/register/define/service/IServiceNameService.java
...analysis/register/define/service/IServiceNameService.java
+3
-0
apm-collector/apm-collector-analysis/analysis-register/register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/register/provider/service/ServiceNameService.java
...nalysis/register/provider/service/ServiceNameService.java
+4
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/decorator/ReferenceDecorator.java
...s/segment/parser/define/decorator/ReferenceDecorator.java
+1
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ui/MemoryMetricEsUIDAO.java
.../apm/collector/storage/es/dao/ui/MemoryMetricEsUIDAO.java
+7
-1
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/ui/MemoryMetricH2UIDAO.java
.../apm/collector/storage/h2/dao/ui/MemoryMetricH2UIDAO.java
+6
-1
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/TraceQuery.java
.../apache/skywalking/apm/collector/ui/query/TraceQuery.java
+3
-3
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ApplicationService.java
...ywalking/apm/collector/ui/service/ApplicationService.java
+8
-6
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/SecondBetweenService.java
...alking/apm/collector/ui/service/SecondBetweenService.java
+5
-1
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ServerService.java
...he/skywalking/apm/collector/ui/service/ServerService.java
+12
-8
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ServiceTopologyService.java
...king/apm/collector/ui/service/ServiceTopologyService.java
+2
-2
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/utils/ApdexCalculator.java
...he/skywalking/apm/collector/ui/utils/ApdexCalculator.java
+5
-1
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/dictionary/OperationNameDictionary.java
...ng/apm/agent/core/dictionary/OperationNameDictionary.java
+19
-3
未找到文件。
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandler.java
浏览文件 @
c6dce72b
...
...
@@ -25,6 +25,8 @@ import org.apache.skywalking.apm.collector.analysis.jvm.define.service.ICpuMetri
import
org.apache.skywalking.apm.collector.analysis.jvm.define.service.IGCMetricService
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryMetricService
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryPoolMetricService
;
import
org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule
;
import
org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.server.grpc.GRPCHandler
;
...
...
@@ -49,12 +51,14 @@ public class JVMMetricsServiceHandler extends JVMMetricsServiceGrpc.JVMMetricsSe
private
final
IGCMetricService
gcMetricService
;
private
final
IMemoryMetricService
memoryMetricService
;
private
final
IMemoryPoolMetricService
memoryPoolMetricService
;
private
final
IInstanceHeartBeatService
instanceHeartBeatService
;
public
JVMMetricsServiceHandler
(
ModuleManager
moduleManager
)
{
this
.
cpuMetricService
=
moduleManager
.
find
(
AnalysisJVMModule
.
NAME
).
getService
(
ICpuMetricService
.
class
);
this
.
gcMetricService
=
moduleManager
.
find
(
AnalysisJVMModule
.
NAME
).
getService
(
IGCMetricService
.
class
);
this
.
memoryMetricService
=
moduleManager
.
find
(
AnalysisJVMModule
.
NAME
).
getService
(
IMemoryMetricService
.
class
);
this
.
memoryPoolMetricService
=
moduleManager
.
find
(
AnalysisJVMModule
.
NAME
).
getService
(
IMemoryPoolMetricService
.
class
);
this
.
instanceHeartBeatService
=
moduleManager
.
find
(
AnalysisMetricModule
.
NAME
).
getService
(
IInstanceHeartBeatService
.
class
);
}
@Override
public
void
collect
(
JVMMetrics
request
,
StreamObserver
<
Downstream
>
responseObserver
)
{
...
...
@@ -67,6 +71,7 @@ public class JVMMetricsServiceHandler extends JVMMetricsServiceGrpc.JVMMetricsSe
sendToMemoryMetricService
(
instanceId
,
time
,
metric
.
getMemoryList
());
sendToMemoryPoolMetricService
(
instanceId
,
time
,
metric
.
getMemoryPoolList
());
sendToGCMetricService
(
instanceId
,
time
,
metric
.
getGcList
());
sendToInstanceHeartBeatService
(
instanceId
,
metric
.
getTime
());
});
responseObserver
.
onNext
(
Downstream
.
newBuilder
().
build
());
...
...
@@ -90,4 +95,8 @@ public class JVMMetricsServiceHandler extends JVMMetricsServiceGrpc.JVMMetricsSe
private
void
sendToGCMetricService
(
int
instanceId
,
long
timeBucket
,
List
<
GC
>
gcs
)
{
gcs
.
forEach
(
gc
->
gcMetricService
.
send
(
instanceId
,
timeBucket
,
gc
.
getPhraseValue
(),
gc
.
getCount
(),
gc
.
getTime
()));
}
private
void
sendToInstanceHeartBeatService
(
int
instanceId
,
long
heartBeatTime
)
{
instanceHeartBeatService
.
heartBeat
(
instanceId
,
heartBeatTime
);
}
}
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ServiceNameDiscoveryServiceHandler.java
浏览文件 @
c6dce72b
...
...
@@ -54,7 +54,7 @@ public class ServiceNameDiscoveryServiceHandler extends ServiceNameDiscoveryServ
int
applicationId
=
serviceNameElement
.
getApplicationId
();
String
serviceName
=
serviceNameElement
.
getServiceName
();
int
srcSpanType
=
serviceNameElement
.
getSrcSpanTypeValue
();
int
serviceId
=
serviceNameService
.
get
OrCreate
(
applicationId
,
srcSpanType
,
serviceName
);
int
serviceId
=
serviceNameService
.
get
(
applicationId
,
srcSpanType
,
serviceName
);
if
(
serviceId
!=
0
)
{
ServiceNameMappingElement
.
Builder
mappingElement
=
ServiceNameMappingElement
.
newBuilder
();
...
...
apm-collector/apm-collector-analysis/analysis-register/register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/register/define/service/IServiceNameService.java
浏览文件 @
c6dce72b
...
...
@@ -24,5 +24,8 @@ import org.apache.skywalking.apm.collector.core.module.Service;
* @author peng-yongsheng
*/
public
interface
IServiceNameService
extends
Service
{
int
getOrCreate
(
int
applicationId
,
int
srcSpanType
,
String
serviceName
);
int
get
(
int
applicationId
,
int
srcSpanType
,
String
serviceName
);
}
apm-collector/apm-collector-analysis/analysis-register/register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/register/provider/service/ServiceNameService.java
浏览文件 @
c6dce72b
...
...
@@ -74,4 +74,8 @@ public class ServiceNameService implements IServiceNameService {
}
return
serviceId
;
}
@Override
public
int
get
(
int
applicationId
,
int
srcSpanType
,
String
serviceName
)
{
return
getServiceIdCacheService
().
get
(
applicationId
,
srcSpanType
,
serviceName
);
}
}
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/decorator/ReferenceDecorator.java
浏览文件 @
c6dce72b
...
...
@@ -27,6 +27,7 @@ import org.apache.skywalking.apm.network.proto.UniqueId;
* @author peng-yongsheng
*/
public
class
ReferenceDecorator
implements
StandardBuilder
{
private
boolean
isOrigin
=
true
;
private
StandardBuilder
standardBuilder
;
private
TraceSegmentReference
referenceObject
;
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ui/MemoryMetricEsUIDAO.java
浏览文件 @
c6dce72b
...
...
@@ -66,8 +66,14 @@ public class MemoryMetricEsUIDAO extends EsDAO implements IMemoryMetricUIDAO {
long
max
=
((
Number
)
response
.
getResponse
().
getSource
().
get
(
MemoryMetricTable
.
COLUMN_MAX
)).
longValue
();
long
used
=
((
Number
)
response
.
getResponse
().
getSource
().
get
(
MemoryMetricTable
.
COLUMN_USED
)).
longValue
();
long
times
=
((
Number
)
response
.
getResponse
().
getSource
().
get
(
MemoryMetricTable
.
COLUMN_TIMES
)).
longValue
();
trend
.
getMetrics
().
add
((
int
)(
used
/
times
));
trend
.
getMaxMetrics
().
add
((
int
)(
max
/
times
));
if
(
max
<
0
)
{
trend
.
getMaxMetrics
().
add
((
int
)(
used
/
times
));
}
else
{
trend
.
getMaxMetrics
().
add
((
int
)(
max
/
times
));
}
}
else
{
trend
.
getMetrics
().
add
(
0
);
trend
.
getMaxMetrics
().
add
(
0
);
...
...
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/ui/MemoryMetricH2UIDAO.java
浏览文件 @
c6dce72b
...
...
@@ -71,7 +71,12 @@ public class MemoryMetricH2UIDAO extends H2DAO implements IMemoryMetricUIDAO {
long
used
=
rs
.
getLong
(
MemoryMetricTable
.
COLUMN_USED
);
long
times
=
rs
.
getLong
(
MemoryMetricTable
.
COLUMN_TIMES
);
trend
.
getMetrics
().
add
((
int
)(
used
/
times
));
trend
.
getMaxMetrics
().
add
((
int
)(
max
/
times
));
if
(
max
<
0
)
{
trend
.
getMaxMetrics
().
add
((
int
)(
used
/
times
));
}
else
{
trend
.
getMaxMetrics
().
add
((
int
)(
max
/
times
));
}
}
else
{
trend
.
getMetrics
().
add
(
0
);
trend
.
getMaxMetrics
().
add
(
0
);
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/TraceQuery.java
浏览文件 @
c6dce72b
...
...
@@ -31,6 +31,7 @@ import org.apache.skywalking.apm.collector.ui.graphql.Query;
import
org.apache.skywalking.apm.collector.ui.service.SegmentTopService
;
import
org.apache.skywalking.apm.collector.ui.service.TraceStackService
;
import
org.apache.skywalking.apm.collector.ui.utils.DurationUtils
;
import
org.apache.skywalking.apm.collector.ui.utils.PaginationUtils
;
/**
* @author peng-yongsheng
...
...
@@ -77,10 +78,9 @@ public class TraceQuery implements Query {
long
maxDuration
=
condition
.
getMaxTraceDuration
();
String
operationName
=
condition
.
getOperationName
();
int
applicationId
=
condition
.
getApplicationId
();
int
limit
=
condition
.
getPaging
().
getPageSize
();
int
from
=
condition
.
getPaging
().
getPageSize
()
*
condition
.
getPaging
().
getPageNum
();
return
getSegmentTopService
().
loadTop
(
startSecondTimeBucket
,
endSecondTimeBucket
,
minDuration
,
maxDuration
,
operationName
,
traceId
,
applicationId
,
limit
,
from
);
PaginationUtils
.
Page
page
=
PaginationUtils
.
INSTANCE
.
exchange
(
condition
.
getPaging
());
return
getSegmentTopService
().
loadTop
(
startSecondTimeBucket
,
endSecondTimeBucket
,
minDuration
,
maxDuration
,
operationName
,
traceId
,
applicationId
,
page
.
getLimit
(),
page
.
getFrom
());
}
public
Trace
queryTrace
(
String
traceId
)
{
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ApplicationService.java
浏览文件 @
c6dce72b
...
...
@@ -72,11 +72,12 @@ public class ApplicationService {
int
...
applicationIds
)
{
List
<
Application
>
applications
=
instanceDAO
.
getApplications
(
startSecondTimeBucket
,
endSecondTimeBucket
,
applicationIds
);
applications
.
forEach
(
application
->
{
for
(
int
i
=
applications
.
size
()
-
1
;
i
>=
0
;
i
--)
{
Application
application
=
applications
.
get
(
i
);
if
(
application
.
getId
()
==
Const
.
NONE_APPLICATION_ID
)
{
applications
.
remove
(
application
);
applications
.
remove
(
i
);
}
}
);
}
applications
.
forEach
(
application
->
{
String
applicationCode
=
applicationCacheService
.
getApplicationById
(
application
.
getId
()).
getApplicationCode
();
...
...
@@ -112,11 +113,12 @@ public class ApplicationService {
return
applicationThroughput
;
}
public
ConjecturalAppBrief
getConjecturalApps
(
Step
step
,
long
startSecondTimeBucket
,
long
endSecondTimeBucket
)
throws
ParseException
{
public
ConjecturalAppBrief
getConjecturalApps
(
Step
step
,
long
startSecondTimeBucket
,
long
endSecondTimeBucket
)
throws
ParseException
{
List
<
ConjecturalApp
>
conjecturalApps
=
networkAddressUIDAO
.
getConjecturalApps
();
conjecturalApps
.
forEach
(
conjecturalApp
->
{
String
nam
e
=
ServerTypeDefine
.
getInstance
().
getServerType
(
conjecturalApp
.
getId
());
conjecturalApp
.
setName
(
nam
e
);
String
serverTyp
e
=
ServerTypeDefine
.
getInstance
().
getServerType
(
conjecturalApp
.
getId
());
conjecturalApp
.
setName
(
serverTyp
e
);
});
ConjecturalAppBrief
conjecturalAppBrief
=
new
ConjecturalAppBrief
();
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/SecondBetweenService.java
浏览文件 @
c6dce72b
...
...
@@ -53,6 +53,10 @@ class SecondBetweenService {
Date
startDate
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
).
parse
(
String
.
valueOf
(
startSecondTimeBucket
));
Date
endDate
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
).
parse
(
String
.
valueOf
(
endSecondTimeBucket
));
return
Seconds
.
secondsBetween
(
new
DateTime
(
startDate
),
new
DateTime
(
endDate
)).
getSeconds
();
int
seconds
=
Seconds
.
secondsBetween
(
new
DateTime
(
startDate
),
new
DateTime
(
endDate
)).
getSeconds
();
if
(
seconds
==
0
)
{
seconds
=
1
;
}
return
seconds
;
}
}
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ServerService.java
浏览文件 @
c6dce72b
...
...
@@ -26,7 +26,6 @@ import java.util.LinkedList;
import
java.util.List
;
import
org.apache.skywalking.apm.collector.cache.CacheModule
;
import
org.apache.skywalking.apm.collector.cache.service.ApplicationCacheService
;
import
org.apache.skywalking.apm.collector.cache.service.InstanceCacheService
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.StringUtils
;
...
...
@@ -59,7 +58,6 @@ public class ServerService {
private
final
ICpuMetricUIDAO
cpuMetricUIDAO
;
private
final
IGCMetricUIDAO
gcMetricUIDAO
;
private
final
IMemoryMetricUIDAO
memoryMetricUIDAO
;
private
final
InstanceCacheService
instanceCacheService
;
private
final
ApplicationCacheService
applicationCacheService
;
private
final
SecondBetweenService
secondBetweenService
;
...
...
@@ -69,18 +67,18 @@ public class ServerService {
this
.
cpuMetricUIDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
ICpuMetricUIDAO
.
class
);
this
.
gcMetricUIDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
IGCMetricUIDAO
.
class
);
this
.
memoryMetricUIDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
IMemoryMetricUIDAO
.
class
);
this
.
instanceCacheService
=
moduleManager
.
find
(
CacheModule
.
NAME
).
getService
(
InstanceCacheService
.
class
);
this
.
applicationCacheService
=
moduleManager
.
find
(
CacheModule
.
NAME
).
getService
(
ApplicationCacheService
.
class
);
this
.
secondBetweenService
=
new
SecondBetweenService
(
moduleManager
);
}
public
List
<
AppServerInfo
>
searchServer
(
String
keyword
,
long
startSecondTimeBucket
,
long
endSecondTimeBucket
)
{
List
<
AppServerInfo
>
serverInfos
=
instanceUIDAO
.
searchServer
(
keyword
,
startSecondTimeBucket
,
endSecondTimeBucket
);
serverInfos
.
forEach
(
serverInfo
->
{
if
(
serverInfo
.
getId
()
==
Const
.
NONE_INSTANCE_ID
)
{
serverInfos
.
remove
(
serverInfo
);
for
(
int
i
=
serverInfos
.
size
()
-
1
;
i
>=
0
;
i
--)
{
if
(
serverInfos
.
get
(
i
).
getId
()
==
Const
.
NONE_INSTANCE_ID
)
{
serverInfos
.
remove
(
i
);
}
}
);
}
buildAppServerInfo
(
serverInfos
);
return
serverInfos
;
...
...
@@ -164,6 +162,8 @@ public class ServerService {
private
void
buildAppServerInfo
(
List
<
AppServerInfo
>
serverInfos
)
{
serverInfos
.
forEach
(
serverInfo
->
{
serverInfo
.
setApplicationCode
(
applicationCacheService
.
getApplicationById
(
serverInfo
.
getApplicationId
()).
getApplicationCode
());
StringBuilder
nameBuilder
=
new
StringBuilder
();
nameBuilder
.
append
(
serverInfo
.
getApplicationCode
());
if
(
StringUtils
.
isNotEmpty
(
serverInfo
.
getOsInfo
()))
{
JsonObject
osInfoJson
=
gson
.
fromJson
(
serverInfo
.
getOsInfo
(),
JsonObject
.
class
);
if
(
osInfoJson
.
has
(
"osName"
))
{
...
...
@@ -180,10 +180,14 @@ public class ServerService {
JsonArray
ipv4Array
=
osInfoJson
.
get
(
"ipv4s"
).
getAsJsonArray
();
List
<
String
>
ipv4s
=
new
LinkedList
<>();
ipv4Array
.
forEach
(
ipv4
->
ipv4s
.
add
(
ipv4
.
getAsString
()));
ipv4Array
.
forEach
(
ipv4
->
{
ipv4s
.
add
(
ipv4
.
getAsString
());
nameBuilder
.
append
(
Const
.
ID_SPLIT
).
append
(
ipv4
.
getAsString
());
});
serverInfo
.
setIpv4
(
ipv4s
);
}
}
serverInfo
.
setName
(
nameBuilder
.
toString
());
});
}
}
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ServiceTopologyService.java
浏览文件 @
c6dce72b
...
...
@@ -73,8 +73,8 @@ public class ServiceTopologyService {
Map
<
Integer
,
String
>
components
=
new
HashMap
<>();
applicationComponents
.
forEach
(
component
->
components
.
put
(
component
.
getApplicationId
(),
ComponentsDefine
.
getInstance
().
getComponentName
(
component
.
getComponentId
())));
List
<
IServiceReferenceMetricUIDAO
.
ServiceReferenceMetric
>
referenceMetrics
=
serviceReferenceMetricUIDAO
.
getFrontServices
(
step
,
startTimeBucket
,
endTimeBucket
,
MetricSource
.
Calle
e
,
serviceId
);
referenceMetrics
.
addAll
(
serviceReferenceMetricUIDAO
.
getBehindServices
(
step
,
startTimeBucket
,
endTimeBucket
,
MetricSource
.
Calle
r
,
serviceId
));
List
<
IServiceReferenceMetricUIDAO
.
ServiceReferenceMetric
>
referenceMetrics
=
serviceReferenceMetricUIDAO
.
getFrontServices
(
step
,
startTimeBucket
,
endTimeBucket
,
MetricSource
.
Calle
r
,
serviceId
);
referenceMetrics
.
addAll
(
serviceReferenceMetricUIDAO
.
getBehindServices
(
step
,
startTimeBucket
,
endTimeBucket
,
MetricSource
.
Calle
e
,
serviceId
));
Set
<
Integer
>
nodeIds
=
new
HashSet
<>();
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/utils/ApdexCalculator.java
浏览文件 @
c6dce72b
...
...
@@ -25,6 +25,10 @@ public enum ApdexCalculator {
INSTANCE
;
public
int
calculate
(
long
satisfiedCount
,
long
toleratingCount
,
long
frustratedCount
)
{
return
(
int
)(((
satisfiedCount
+
toleratingCount
/
2
)
*
100
)
/
(
satisfiedCount
+
toleratingCount
+
frustratedCount
));
if
(
satisfiedCount
+
toleratingCount
+
frustratedCount
==
0
)
{
return
100
;
}
else
{
return
(
int
)(((
satisfiedCount
+
toleratingCount
/
2
)
*
100
)
/
(
satisfiedCount
+
toleratingCount
+
frustratedCount
));
}
}
}
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/dictionary/OperationNameDictionary.java
浏览文件 @
c6dce72b
...
...
@@ -74,6 +74,7 @@ public enum OperationNameDictionary {
ServiceNameElement
serviceNameElement
=
ServiceNameElement
.
newBuilder
()
.
setApplicationId
(
operationNameKey
.
getApplicationId
())
.
setServiceName
(
operationNameKey
.
getOperationName
())
.
setSrcSpanType
(
operationNameKey
.
getSpanType
())
.
build
();
builder
.
addElements
(
serviceNameElement
);
}
...
...
@@ -122,9 +123,14 @@ public enum OperationNameDictionary {
OperationNameKey
key
=
(
OperationNameKey
)
o
;
if
(
applicationId
!=
key
.
applicationId
)
return
false
;
return
operationName
.
equals
(
key
.
operationName
);
boolean
isApplicationMatch
=
false
;
if
(
applicationId
==
key
.
applicationId
)
{
isApplicationMatch
=
true
;
}
else
if
(
operationName
.
equals
(
key
.
operationName
))
{
isApplicationMatch
=
true
;
}
return
isApplicationMatch
&&
isEntry
==
key
.
isEntry
&&
isExit
==
key
.
isExit
;
}
@Override
public
int
hashCode
()
{
...
...
@@ -140,5 +146,15 @@ public enum OperationNameDictionary {
boolean
isExit
()
{
return
isExit
;
}
SpanType
getSpanType
()
{
if
(
isEntry
)
{
return
SpanType
.
Entry
;
}
else
if
(
isExit
)
{
return
SpanType
.
Exit
;
}
else
{
return
SpanType
.
Local
;
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录