Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dql-kieker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Descartes Research
dql-kieker
Commits
cf2d0c80
Commit
cf2d0c80
authored
6 years ago
by
Jürgen Walter
Browse files
Options
Downloads
Patches
Plain Diff
Improved parsing of method signatures
parent
a0b0696f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools.descartes.dql.connector.kieker/src/tools/descartes/dql/connector/kieker/filter/ClassAndInterfaceFilter.java
+20
-21
20 additions, 21 deletions
.../dql/connector/kieker/filter/ClassAndInterfaceFilter.java
with
20 additions
and
21 deletions
tools.descartes.dql.connector.kieker/src/tools/descartes/dql/connector/kieker/filter/ClassAndInterfaceFilter.java
+
20
−
21
View file @
cf2d0c80
...
...
@@ -38,8 +38,6 @@ public class ClassAndInterfaceFilter extends AbstractFilterPlugin {
super
(
configuration
,
projectContext
);
}
@InputPort
(
name
=
ClassAndInterfaceFilter
.
INPUT_PORT_NAME
,
description
=
"Extract class-information from monitoring record"
,
...
...
@@ -55,39 +53,40 @@ public class ClassAndInterfaceFilter extends AbstractFilterPlugin {
final
String
signature
=
opExRecord
.
getOperationSignature
();
final
long
exTime
=
opExRecord
.
getTout
()-
opExRecord
.
getTin
();
final
String
classPattern
=
"[\\p{Graph}]+((\\.)(\\w)*[<(].*[>)])"
;
//String-pattern to extract the component information
final
String
interfacePattern
=
"((\\.)(\\w)*[<(].*[>)])"
;
//String-pattern to extract the component information
final
String
requestID
=
opExRecord
.
getSessionId
();
// final long traceID = opExRecord.getTraceId();
// final long eoi = opExRecord.getEoi();
// final long ess = opExRecord.getEss();
String
className
=
null
;
String
interfaceName
=
null
;
try
{
String
[]
redundantInfo
=
signature
.
split
(
classPattern
);
//(redundantInfo + classAndInterfaceString) - redundantInfo = classAndInterfaceString
String
classAndInterfaceString
=
signature
;
if
(
redundantInfo
.
length
>
0
){
classAndInterfaceString
=
signature
.
substring
(
redundantInfo
[
0
].
length
());
}
//remove return type + visibility from method signature string
String
classAndInterfaceString
=
signature
;
//split("(\\s)*")[2];
classAndInterfaceString
=
classAndInterfaceString
.
replace
(
"transient"
,
""
);
classAndInterfaceString
=
classAndInterfaceString
.
replace
(
"public"
,
""
);
classAndInterfaceString
=
classAndInterfaceString
.
replace
(
"private"
,
""
);
classAndInterfaceString
=
classAndInterfaceString
.
replace
(
"protected"
,
""
);
classAndInterfaceString
=
classAndInterfaceString
.
replace
(
"synchronized"
,
""
);
classAndInterfaceString
=
classAndInterfaceString
.
replace
(
"static"
,
""
);
classAndInterfaceString
=
classAndInterfaceString
.
trim
();
classAndInterfaceString
=
classAndInterfaceString
.
substring
(
classAndInterfaceString
.
indexOf
(
" "
)+
1
);
classAndInterfaceString
=
classAndInterfaceString
.
replaceAll
(
"\\$(\\d)*"
,
""
);
classAndInterfaceString
=
classAndInterfaceString
.
trim
();
//extraction of the class information
String
[]
componentSeparatedByNonWordChar
=
classAndInterfaceString
.
split
(
interfacePattern
);
className
=
componentSeparatedByNonWordChar
[
0
].
trim
();
//extraction of the interface information
interfaceName
=
classAndInterfaceString
.
substring
(
className
.
length
()+
1
).
trim
();
if
(
classAndInterfaceString
.
length
()
>
className
.
length
())
{
interfaceName
=
classAndInterfaceString
.
substring
(
className
.
length
()+
1
).
trim
();
}
else
{
log
.
error
(
"EEEEE "
+
classAndInterfaceString
);
log
.
error
(
"EEEEE "
+
className
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
/*
* TODO
*/
log
.
error
(
"Errro parsing signature"
,
e
);
}
long
classID
=
putIntoClassMap
(
timestamp
,
hostName
,
className
,
requestID
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment