Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kieker-TeeTime-Stages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeeTime
Kieker-TeeTime-Stages
Commits
a18ef023
Commit
a18ef023
authored
8 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
worked on dependency graphs
parent
03fedafb
No related branches found
No related tags found
1 merge request
!19
Trace aggr analysis
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/kieker/analysis/dev/DependencyGraphCreator.java
+80
-0
80 additions, 0 deletions
...main/java/kieker/analysis/dev/DependencyGraphCreator.java
with
80 additions
and
0 deletions
src/main/java/kieker/analysis/dev/DependencyGraphCreator.java
0 → 100644
+
80
−
0
View file @
a18ef023
package
kieker.analysis.dev
;
import
java.util.Collection
;
import
kieker.analysis.domain.systemdependency.Component
;
import
kieker.analysis.domain.systemdependency.Container
;
import
kieker.analysis.domain.systemdependency.Operation
;
import
kieker.analysis.domain.systemdependency.SoftwareSystem
;
import
kieker.analysis.domain.systemdependency.SystemEntity
;
import
kieker.analysis.util.graph.Graph
;
import
kieker.analysis.util.graph.Vertex
;
import
kieker.analysis.util.graph.impl.GraphImpl
;
public
class
DependencyGraphCreator
{
private
final
boolean
containers
=
true
;
private
final
boolean
components
=
true
;
private
final
boolean
operations
=
true
;
private
final
boolean
containerDependencies
=
true
;
private
final
boolean
componentDependencies
=
true
;
private
final
boolean
operationDependencies
=
true
;
public
Graph
create
(
final
SoftwareSystem
softwareSystem
)
{
Graph
graph
=
new
GraphImpl
();
addContainers
(
graph
,
softwareSystem
.
getContainers
());
return
graph
;
}
private
void
addContainers
(
final
Graph
graph
,
final
Collection
<
Container
>
containers
)
{
for
(
Container
container
:
containers
)
{
if
(
this
.
containers
)
{
Vertex
vertex
=
graph
.
addVertex
(
container
.
getIdentifier
());
vertex
.
setProperty
(
"ContainerName"
,
container
.
getName
());
addDurationStatistics
(
vertex
,
container
);
addComponents
(
vertex
.
addChildGraph
(),
container
.
getComponents
());
}
else
{
addComponents
(
graph
,
container
.
getComponents
());
}
}
}
private
void
addComponents
(
final
Graph
graph
,
final
Collection
<
Component
>
components
)
{
for
(
Component
component
:
components
)
{
if
(
this
.
components
)
{
Vertex
vertex
=
graph
.
addVertex
(
component
.
getIdentifier
());
vertex
.
setProperty
(
"ComponentName"
,
component
.
getName
());
vertex
.
setProperty
(
"ContainerName"
,
component
.
getContainer
().
getName
());
addDurationStatistics
(
vertex
,
component
);
addOperations
(
vertex
.
addChildGraph
(),
component
.
getOperations
());
}
else
{
addOperations
(
graph
,
component
.
getOperations
());
}
}
}
private
void
addOperations
(
final
Graph
graph
,
final
Collection
<
Operation
>
operations
)
{
for
(
Operation
operation
:
operations
)
{
if
(
this
.
operations
)
{
Vertex
vertex
=
graph
.
addVertex
(
operation
.
getIdentifier
());
vertex
.
setProperty
(
"OperationName"
,
operation
.
getName
());
vertex
.
setProperty
(
"ComponentName"
,
operation
.
getComponent
().
getName
());
vertex
.
setProperty
(
"ContainerName"
,
operation
.
getComponent
().
getContainer
().
getName
());
addDurationStatistics
(
vertex
,
operation
);
}
}
}
private
void
addDurationStatistics
(
final
Vertex
vertex
,
final
SystemEntity
systemEntity
)
{
vertex
.
setProperty
(
"MaxDuration"
,
systemEntity
.
getMaxDuration
());
vertex
.
setProperty
(
"MinDuration"
,
systemEntity
.
getMinDuration
());
vertex
.
setProperty
(
"MeanDuration"
,
systemEntity
.
getMeanDuration
());
vertex
.
setProperty
(
"MedianDuration"
,
systemEntity
.
getMedianDuration
());
vertex
.
setProperty
(
"TotalDuration"
,
systemEntity
.
getTotalDuration
());
}
}
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